|
From: <sv...@va...> - 2011-06-15 15:16:41
|
Author: sewardj
Date: 2011-06-15 16:11:50 +0100 (Wed, 15 Jun 2011)
New Revision: 11815
Log:
Add debugging hack, if 0'd, to print a stack trace at each syscall.
Modified:
trunk/coregrind/m_syswrap/syswrap-main.c
Modified: trunk/coregrind/m_syswrap/syswrap-main.c
===================================================================
--- trunk/coregrind/m_syswrap/syswrap-main.c 2011-06-15 15:11:07 UTC (rev 11814)
+++ trunk/coregrind/m_syswrap/syswrap-main.c 2011-06-15 15:11:50 UTC (rev 11815)
@@ -1429,6 +1429,13 @@
is interrupted by a signal. */
sysno = sci->orig_args.sysno;
+ /* It's sometimes useful, as a crude debugging hack, to get a
+ stack trace at each (or selected) syscalls. */
+ if (0 /* sysno == __NR_mmap */) {
+ VG_(umsg)("\n");
+ VG_(get_and_pp_StackTrace)(tid, 10);
+ }
+
# if defined(VGO_darwin)
/* Record syscall class. But why? Because the syscall might be
interrupted by a signal, and in the signal handler (which will
|