]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Tweak the format of stack traces, so they're more consistent.
authorNicholas Nethercote <njn@valgrind.org>
Mon, 16 Mar 2009 22:11:31 +0000 (22:11 +0000)
committerNicholas Nethercote <njn@valgrind.org>
Mon, 16 Mar 2009 22:11:31 +0000 (22:11 +0000)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9437

NEWS
coregrind/m_debuginfo/debuginfo.c

diff --git a/NEWS b/NEWS
index 7e536384a948c4e9ff696d9400046dc54eff8896..d0d1349ddf4e0fc0de82b0de86418a2ea9c57de3 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -15,6 +15,29 @@ Release 3.5.0 (???)
     are directly pointed to by a start-pointer, were previously marked as
     "still reachable".  They are now correctly marked as "possibly lost".
 
+* The format of some (non-XML) stack trace entries has changed a little.
+  Previously there were six possible forms:
+
+    0x80483BF: really (a.c:20)
+    0x80483BF: really (in /foo/a.out)
+    0x80483BF: really
+    0x80483BF: (within /foo/a.out)
+    0x80483BF: ??? (a.c:20)
+    0x80483BF: ???
+
+  The third and fourth of these forms have been made more consistent with
+  the others.  The six possible forms are now:
+  
+    0x80483BF: really (a.c:20)
+    0x80483BF: really (in /foo/a.out)
+    0x80483BF: really (in ???)
+    0x80483BF: ??? (in /foo/a.out)
+    0x80483BF: ??? (a.c:20)
+    0x80483BF: ???
+
+  Stack traces produced when --xml=yes is specified are different and
+  unchanged.
+
 * The location of some install files has changed.  This should not affect
   most users.  Those who might be affected:
 
index a362812086eace0781bcca511a622e6734ab2e64..842161e4752cbc1e1e3b4453729cd85010db37c0 100644 (file)
@@ -1605,19 +1605,20 @@ Char* VG_(describe_IP)(Addr eip, Char* buf, Int n_buf)
    } else {
 
       /* Print for humans to read */
+      //
+      // Possible forms:
+      //
+      //   0x80483BF: really (a.c:20)
+      //   0x80483BF: really (in /foo/a.out)
+      //   0x80483BF: really (in ???)
+      //   0x80483BF: ??? (in /foo/a.out)
+      //   0x80483BF: ??? (a.c:20)
+      //   0x80483BF: ???
+      //
       VG_(sprintf)(ibuf,"0x%llX: ", (ULong)eip);
       APPEND(ibuf);
-      if (know_fnname) { 
+      if (know_fnname) {
          APPEND(buf_fn);
-         if (!know_srcloc && know_objname) {
-            APPEND(" (in ");
-            APPEND(buf_obj);
-            APPEND(")");
-         }
-      } else if (know_objname && !know_srcloc) {
-         APPEND("(within ");
-         APPEND(buf_obj);
-         APPEND(")");
       } else {
          APPEND("???");
       }
@@ -1628,6 +1629,14 @@ Char* VG_(describe_IP)(Addr eip, Char* buf, Int n_buf)
          VG_(sprintf)(ibuf,"%d",lineno);
          APPEND(ibuf);
          APPEND(")");
+      } else if (know_objname) {
+         APPEND(" (in ");
+         APPEND(buf_obj);
+         APPEND(")");
+      } else if (know_fnname) {
+         // Nb: do this in two steps because "??)" is a trigraph!
+         APPEND(" (in ???");
+         APPEND(")");
       }
 
    }