aboutsummaryrefslogtreecommitdiff
path: root/sim/ppc/psim.c
diff options
context:
space:
mode:
authorMichael Meissner <gnu@the-meissners.org>1995-10-06 21:23:35 +0000
committerMichael Meissner <gnu@the-meissners.org>1995-10-06 21:23:35 +0000
commit7ca054e88efb07b01fdc2f74eea32126dc1b5eab (patch)
treea32ccaf587d4b8aca7ff19de208ab582ce2c0ef9 /sim/ppc/psim.c
parent9e0b0ae7faed53e41bbd75485d41e2bea8de1443 (diff)
downloadgdb-7ca054e88efb07b01fdc2f74eea32126dc1b5eab.zip
gdb-7ca054e88efb07b01fdc2f74eea32126dc1b5eab.tar.gz
gdb-7ca054e88efb07b01fdc2f74eea32126dc1b5eab.tar.bz2
Print exit status/signal number if -I
Diffstat (limited to 'sim/ppc/psim.c')
-rw-r--r--sim/ppc/psim.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/sim/ppc/psim.c b/sim/ppc/psim.c
index 405cf12..96b94e5 100644
--- a/sim/ppc/psim.c
+++ b/sim/ppc/psim.c
@@ -910,7 +910,24 @@ psim_write_memory(psim *system,
INLINE_PSIM void
psim_print_info(psim *system, int verbose)
{
+ psim_status status;
int i;
+
+
+ status = psim_get_status(system);
+ switch (status.reason) {
+ default:
+ break; /* our caller will print an appropriate error message */
+
+ case was_exited:
+ printf ("Exit status = %d\n", status.signal);
+ break;
+
+ case was_signalled:
+ printf ("Got signal %d\n", status.signal);
+ break;
+ }
+
for (i = 0; i < system->nr_cpus; i++)
cpu_print_info (system->processors[i], verbose);
}