|
From: <sv...@va...> - 2008-01-08 17:44:12
|
Author: tom
Date: 2008-01-08 17:44:04 +0000 (Tue, 08 Jan 2008)
New Revision: 7327
Log:
If we don't find the address in the segInfo list that ask the address
space manager for the name of the file it was mapped from as a fallback
solution.
This allows us to print the names of exe/dll files in the stack trace
when running programs under wine.
Modified:
trunk/coregrind/m_debuginfo/debuginfo.c
Modified: trunk/coregrind/m_debuginfo/debuginfo.c
===================================================================
--- trunk/coregrind/m_debuginfo/debuginfo.c 2008-01-08 17:29:02 UTC (rev 7326)
+++ trunk/coregrind/m_debuginfo/debuginfo.c 2008-01-08 17:44:04 UTC (rev 7327)
@@ -659,6 +659,8 @@
{
Int used;
SegInfo* si;
+ const NSegment *seg;
+ HChar* filename;
vg_assert(nbuf > 0);
for (si = segInfo_list; si != NULL; si = si->next) {
@@ -680,6 +682,12 @@
return True;
}
}
+ if ((seg = VG_(am_find_nsegment(a))) != NULL &&
+ (filename = VG_(am_get_filename)(seg)) != NULL)
+ {
+ VG_(strncpy_safely)(buf, filename, nbuf);
+ return True;
+ }
return False;
}
|