]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Improve m_redir.c debug trace by adding filename.
authorPhilippe Waroquiers <philippe.waroquiers@skynet.be>
Thu, 3 May 2012 21:09:51 +0000 (21:09 +0000)
committerPhilippe Waroquiers <philippe.waroquiers@skynet.be>
Thu, 3 May 2012 21:09:51 +0000 (21:09 +0000)
Many objects (shared or non shared) have no soname.
In such case, showing the filename clarifies where the
redir spec is coming from.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12552

coregrind/m_redir.c

index 9c7dbd66a4178e760af4f59bb9492e84226cc7ef..c7936b156791d70ed8222d6a4daa5cf4a8c0d525 100644 (file)
@@ -1547,11 +1547,15 @@ static void show_redir_state ( HChar* who )
    VG_(message)(Vg_DebugMsg, "<<\n");
    VG_(message)(Vg_DebugMsg, "   ------ REDIR STATE %s ------\n", who);
    for (ts = topSpecs; ts; ts = ts->next) {
-      VG_(message)(Vg_DebugMsg, 
-                   "   TOPSPECS of soname %s\n",
-                   ts->seginfo
-                      ? (HChar*)VG_(DebugInfo_get_soname)(ts->seginfo)
-                      : "(hardwired)" );
+      if (ts->seginfo)
+         VG_(message)(Vg_DebugMsg, 
+                      "   TOPSPECS of soname %s filename %s\n",
+                      (HChar*)VG_(DebugInfo_get_soname)(ts->seginfo),
+                      (HChar*)VG_(DebugInfo_get_filename)(ts->seginfo));
+      else
+         VG_(message)(Vg_DebugMsg, 
+                      "   TOPSPECS of soname (hardwired)\n");
+         
       for (sp = ts->specs; sp; sp = sp->next)
          show_spec("     ", sp);
    }