|
From: <sv...@va...> - 2009-03-16 22:11:43
|
Author: njn
Date: 2009-03-16 22:11:31 +0000 (Mon, 16 Mar 2009)
New Revision: 9437
Log:
Tweak the format of stack traces, so they're more consistent.
Modified:
trunk/NEWS
trunk/coregrind/m_debuginfo/debuginfo.c
Modified: trunk/NEWS
===================================================================
--- trunk/NEWS 2009-03-16 20:37:23 UTC (rev 9436)
+++ trunk/NEWS 2009-03-16 22:11:31 UTC (rev 9437)
@@ -15,6 +15,29 @@
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:
Modified: trunk/coregrind/m_debuginfo/debuginfo.c
===================================================================
--- trunk/coregrind/m_debuginfo/debuginfo.c 2009-03-16 20:37:23 UTC (rev 9436)
+++ trunk/coregrind/m_debuginfo/debuginfo.c 2009-03-16 22:11:31 UTC (rev 9437)
@@ -1605,19 +1605,20 @@
} 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 @@
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(")");
}
}
|