summaryrefslogtreecommitdiffstats
path: root/gdb/inferior.c
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2011-06-03 15:32:44 +0000
committerTom Tromey <tromey@redhat.com>2011-06-03 15:32:44 +0000
commit8cf64490f293549a0b8e64342d7c97099df19974 (patch)
tree2aa409936b65cf0a40f19a32c9d2b053132f9bba /gdb/inferior.c
parent8ddd9a20a759fb2dd5d221914747eaf62c62c994 (diff)
downloadppe42-binutils-8cf64490f293549a0b8e64342d7c97099df19974.tar.gz
ppe42-binutils-8cf64490f293549a0b8e64342d7c97099df19974.zip
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.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/gdb/inferior.c b/gdb/inferior.c
index d3e3585a33..bfdbf302a4 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
OpenPOWER on IntegriCloud