From: Mike Frysinger Date: Mon, 19 Mar 2012 03:58:36 +0000 (+0000) Subject: sim: nrun: decode signal when crashing X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=9a5e0c494c2a828dc4d9223e5f4db61cda7df09f;p=binutils-gdb.git sim: nrun: decode signal when crashing This isn't entirely correct in that it assumes the signal numbering of the target and host match, but seeing as we already make that assumption in a few places, this patch doesn't make the situation any worse. Signed-off-by: Mike Frysinger --- diff --git a/sim/common/ChangeLog b/sim/common/ChangeLog index df6417cfb0e..0f52baf424f 100644 --- a/sim/common/ChangeLog +++ b/sim/common/ChangeLog @@ -1,3 +1,7 @@ +2012-03-18 Mike Frysinger + + * nrun.c (main): Display strsignal of sigrc. + 2012-01-06 Mike Frysinger * Makefile.in (abs_srcdir): Declare. diff --git a/sim/common/nrun.c b/sim/common/nrun.c index b7dbbcf851b..a50ae06aecc 100644 --- a/sim/common/nrun.c +++ b/sim/common/nrun.c @@ -202,7 +202,8 @@ main (int argc, char **argv) case sim_signalled: case sim_stopped: if (sigrc != 0) - fprintf (stderr, "program stopped with signal %d.\n", sigrc); + fprintf (stderr, "program stopped with signal %d (%s).\n", sigrc, + strsignal (sigrc)); break; case sim_exited: