]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Added and commented out code for printing the result of VG_(get_StackTrace)().
authorBart Van Assche <bvanassche@acm.org>
Sun, 6 Apr 2008 13:08:32 +0000 (13:08 +0000)
committerBart Van Assche <bvanassche@acm.org>
Sun, 6 Apr 2008 13:08:32 +0000 (13:08 +0000)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7853

exp-drd/drd_clientreq.c

index 481ad17c1a7e782aa69ef54175f7f063c952cfde..4adad733d370fdcd0d900dbe7d645254a97fd48d 100644 (file)
@@ -122,6 +122,21 @@ static Bool drd_handle_client_request(ThreadId vg_tid, UWord* arg, UWord* ret)
   case VG_USERREQ__DRD_SUPPRESS_CURRENT_STACK:
   {
     const Addr topmost_sp = highest_used_stack_address(vg_tid);
+#if 0
+    UInt nframes;
+    const UInt n_ips = 20;
+    Addr ips[n_ips], sps[n_ips], fps[n_ips];
+    unsigned i;
+
+    nframes = VG_(get_StackTrace)(vg_tid, ips, n_ips, sps, fps, 0);
+
+    VG_(message)(Vg_DebugMsg, "thread %d/%d", vg_tid, drd_tid);
+    for (i = 0; i < nframes; i++)
+    {
+      VG_(message)(Vg_DebugMsg, "[%2d] 0x%09lx 0x%09lx 0x%09lx",
+                   i, ips[i], sps[i], fps[i]);
+    }
+#endif
     thread_set_stack_startup(drd_tid, VG_(get_SP)(vg_tid));
     drd_start_suppression(topmost_sp, VG_(thread_get_stack_max)(vg_tid),
                           "stack top");