forked from Imagelibrary/binutils-gdb
Exit code of exited inferiors in -list-thread-groups
Don't reset the exit code at inferior exit and print it in -list-thread-groups. gdb/ChangeLog: * NEWS: Announce new exit-code field in -list-thread-groups output. * inferior.c (exit_inferior_1): Don't clear exit code. (inferior_appeared): Clear exit code. * mi/mi-main.c (print_one_inferior): Add printing of the exit code. gdb/testsuite/ChangeLog: * gdb.mi/mi-exit-code.exp: New file. * gdb.mi/mi-exit-code.c: New file. gdb/doc/ChangeLog: * gdb.texinfo (Miscellaneous gdb/mi Commands): Document new exit-code field in -list-thread-groups output.
This commit is contained in:
@@ -275,8 +275,6 @@ exit_inferior_1 (struct inferior *inftoex, int silent)
|
||||
inf->vfork_child = NULL;
|
||||
}
|
||||
|
||||
inf->has_exit_code = 0;
|
||||
inf->exit_code = 0;
|
||||
inf->pending_detach = 0;
|
||||
}
|
||||
|
||||
@@ -322,6 +320,8 @@ void
|
||||
inferior_appeared (struct inferior *inf, int pid)
|
||||
{
|
||||
inf->pid = pid;
|
||||
inf->has_exit_code = 0;
|
||||
inf->exit_code = 0;
|
||||
|
||||
observer_notify_inferior_appeared (inf);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user