diff options
author | Mike Frysinger <vapier@gentoo.org> | 2009-04-06 04:26:04 -0400 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2009-04-06 04:31:51 -0400 |
commit | 68f20266ec68605b864d5d4aa8029c3971a52c03 (patch) | |
tree | bddab20a03fe919ab667f7e7ed3a4b388d5919dd /libsandbox | |
parent | libsandbox: accept flexible syscall defines (diff) | |
download | sandbox-68f20266ec68605b864d5d4aa8029c3971a52c03.tar.gz sandbox-68f20266ec68605b864d5d4aa8029c3971a52c03.tar.bz2 sandbox-68f20266ec68605b864d5d4aa8029c3971a52c03.zip |
libsandbox: decode signal details when falling over in trace
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'libsandbox')
-rw-r--r-- | libsandbox/trace.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/libsandbox/trace.c b/libsandbox/trace.c index dd3bfb8..1fdeee6 100644 --- a/libsandbox/trace.c +++ b/libsandbox/trace.c @@ -114,11 +114,13 @@ static const char *strsig(int sig) { switch (sig) { #define S(s) case SIG##s: return "SIG"#s; + S(ABRT) S(CHLD) S(CONT) S(KILL) - S(TRAP) + S(SEGV) S(STOP) + S(TRAP) #undef S default: return "SIG???"; } @@ -159,8 +161,11 @@ static void trace_child_signal(int signo, siginfo_t *info, void *context) /* fall through */ } - SB_EERROR("ISE:trace_child_signal ", "child signal %i, code %i, status %i\n", - signo, info->si_code, info->si_status); + SB_EERROR("ISE:trace_child_signal ", "child (%i) signal %s(%i), code %s(%i), status %s(%i)\n", + trace_pid, + strsig(signo), signo, + strcld_chld(info->si_code), info->si_code, + strsig(info->si_status), info->si_status); } static const struct syscall_entry *lookup_syscall_in_tbl(const struct syscall_entry *tbl, int nr) |