From: Michael Meissner Date: Fri, 6 Oct 1995 21:23:35 +0000 (+0000) Subject: Print exit status/signal number if -I X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=7ca054e88efb07b01fdc2f74eea32126dc1b5eab;p=binutils-gdb.git Print exit status/signal number if -I --- diff --git a/sim/ppc/ChangeLog b/sim/ppc/ChangeLog index 625b699a1e3..f02ec30460b 100644 --- a/sim/ppc/ChangeLog +++ b/sim/ppc/ChangeLog @@ -1,3 +1,7 @@ +Fri Oct 6 17:23:10 1995 Michael Meissner + + * psim.c (psim_print_info): Print exit status or signal number. + Mon Oct 2 11:46:37 1995 Michael Meissner * cpu.c (struct _cpu): Add number_of_insns field to trace how many diff --git a/sim/ppc/psim.c b/sim/ppc/psim.c index 405cf129cdc..96b94e5ad87 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); }