aboutsummaryrefslogtreecommitdiff
path: root/sim/common/nrun.c
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2012-03-19 03:58:36 +0000
committerMike Frysinger <vapier@gentoo.org>2012-03-19 03:58:36 +0000
commit9a5e0c494c2a828dc4d9223e5f4db61cda7df09f (patch)
treebfe9919284d7ded4fa0952fef824821919791e60 /sim/common/nrun.c
parent026789b1f86366f6ef9cc579f9b5f635ea9127d0 (diff)
downloadbinutils-9a5e0c494c2a828dc4d9223e5f4db61cda7df09f.zip
binutils-9a5e0c494c2a828dc4d9223e5f4db61cda7df09f.tar.gz
binutils-9a5e0c494c2a828dc4d9223e5f4db61cda7df09f.tar.bz2
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 <vapier@gentoo.org>
Diffstat (limited to 'sim/common/nrun.c')
-rw-r--r--sim/common/nrun.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sim/common/nrun.c b/sim/common/nrun.c
index b7dbbcf..a50ae06 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: