diff options
author | Tom Tromey <tromey@redhat.com> | 2011-06-03 15:32:44 +0000 |
---|---|---|
committer | Tom Tromey <tromey@redhat.com> | 2011-06-03 15:32:44 +0000 |
commit | 69daa0ca6b3aef6e2f6b6cc941ce790001c8f8c2 (patch) | |
tree | 84f6403fa767313ae24a1ce22393c77e6a26b66f /gdb/inferior.c | |
parent | 00a69a4bc9472e28ea8a13e23af8b9e59f955c43 (diff) | |
download | gdb-69daa0ca6b3aef6e2f6b6cc941ce790001c8f8c2.tar.gz |
gdb
* python/py-inferior.c (python_inferior_exit): Use inferior's exit
code fields.
* python/py-exitedevent.c (create_exited_event_object): Change
type of 'exit_code'. Optionally add exit_code attribute.
(emit_exited_event): Change type of 'exit_code'.
* python/py-event.h (emit_exited_event): Update.
* mi/mi-interp.c (mi_inferior_exit): Print exit code.
* infrun.c (handle_inferior_event): Set exit code fields on
inferior.
* inferior.h (struct inferior) <has_exit_code, exit_code>: New
fields.
* inferior.c (exit_inferior_1): Initialize new fields.
gdb/doc
* gdb.texinfo (GDB/MI Async Records): Document 'exit-code' field.
(Events In Python): Note that exit_code is optional.
Diffstat (limited to 'gdb/inferior.c')
-rw-r--r-- | gdb/inferior.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/gdb/inferior.c b/gdb/inferior.c index d3e3585a334..bfdbf302a40 100644 --- a/gdb/inferior.c +++ b/gdb/inferior.c @@ -281,6 +281,9 @@ exit_inferior_1 (struct inferior *inftoex, int silent) inf->vfork_parent->vfork_child = NULL; inf->vfork_parent = NULL; } + + inf->has_exit_code = 0; + inf->exit_code = 0; } void |