From 2ddf4301102f7a78a03bccf86051a63111b1fcc1 Mon Sep 17 00:00:00 2001 From: Simon Marchi Date: Mon, 29 Sep 2014 17:33:09 -0400 Subject: 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. --- gdb/doc/gdb.texinfo | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'gdb/doc/gdb.texinfo') diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo index 026706a..429c650 100644 --- a/gdb/doc/gdb.texinfo +++ b/gdb/doc/gdb.texinfo @@ -31152,6 +31152,11 @@ valid type. The target-specific process identifier. This field is only present for thread groups of type @samp{process} and only if the process exists. +@item exit-code +The exit code of this group's last exited thread, formatted in octal. +This field is only present for thread groups of type @samp{process} and +only if the process is not running. + @item num_children The number of children this thread group has. This field may be absent for an available thread group. -- cgit v1.1