From 69daa0ca6b3aef6e2f6b6cc941ce790001c8f8c2 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Fri, 3 Jun 2011 15:32:44 +0000 Subject: 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) : 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. --- gdb/inferior.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'gdb/inferior.h') diff --git a/gdb/inferior.h b/gdb/inferior.h index 9982a7a5379..346bb87a02d 100644 --- a/gdb/inferior.h +++ b/gdb/inferior.h @@ -517,6 +517,11 @@ struct inferior /* Private data used by the target vector implementation. */ struct private_inferior *private; + /* HAS_EXIT_CODE is true if the inferior exited with an exit code. + In this case, the EXIT_CODE field is also valid. */ + int has_exit_code; + LONGEST exit_code; + /* We keep a count of the number of times the user has requested a particular syscall to be tracked, and pass this information to the target. This lets capable targets implement filtering directly. */ -- cgit v1.2.1