From: Julian Seward Date: Wed, 20 Oct 2004 18:36:23 +0000 (+0000) Subject: In the signal handler, make debug printing a bit more verbose. X-Git-Tag: svn/VALGRIND_3_0_1^2~945 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=13743647042851b1e1e0ba9622a613ed1d43e5fa;p=thirdparty%2Fvalgrind.git In the signal handler, make debug printing a bit more verbose. git-svn-id: svn://svn.valgrind.org/vex/trunk@389 --- diff --git a/VEX/head20041019/coregrind/vg_signals.c b/VEX/head20041019/coregrind/vg_signals.c index 602393c97f..5c5d0266b5 100644 --- a/VEX/head20041019/coregrind/vg_signals.c +++ b/VEX/head20041019/coregrind/vg_signals.c @@ -1700,6 +1700,7 @@ void vg_sync_signalhandler ( Int sigNo, vki_ksiginfo_t *info, struct vki_ucontex */ if (VG_(clo_trace_signals)) { + VG_(message)(Vg_DebugMsg, ""); VG_(message)(Vg_DebugMsg, "signal %d arrived ... si_code=%d", sigNo, info->si_code ); } vg_assert(sigNo >= 1 && sigNo <= VKI_KNSIG); @@ -1767,6 +1768,9 @@ void vg_sync_signalhandler ( Int sigNo, vki_ksiginfo_t *info, struct vki_ucontex then extend the stack segment. */ Addr base = PGROUNDDN(esp); + if (VG_(clo_trace_signals)) { + VG_(message)(Vg_DebugMsg, "attempt to extend stack downwards ..."); + } if (seg->len + (seg->addr - base) <= VG_(threads)[tid].stack_size && (void*)-1 != VG_(mmap)((Char *)base, seg->addr - base, VKI_PROT_READ|VKI_PROT_WRITE|VKI_PROT_EXEC, @@ -1774,7 +1778,14 @@ void vg_sync_signalhandler ( Int sigNo, vki_ksiginfo_t *info, struct vki_ucontex SF_STACK|SF_GROWDOWN, -1, 0)) { - return; // extension succeeded, restart instruction + if (VG_(clo_trace_signals)) { + VG_(message)(Vg_DebugMsg, "... succeeded."); + } + return; // extension succeeded, restart instruction + } else { + if (VG_(clo_trace_signals)) { + VG_(message)(Vg_DebugMsg, "... failed."); + } } /* Otherwise fall into normal signal handling */ } else if (info->si_code == 2 && /* SEGV_ACCERR */