|
From: <sv...@va...> - 2012-02-27 11:06:59
|
Author: sewardj
Date: 2012-02-27 11:02:20 +0000 (Mon, 27 Feb 2012)
New Revision: 12406
Log:
Android only: make the debuginfo mapping hack more flexible.
Previously it looked for the debuginfo object for "/system/X" in
"/sdcard/symbols/system/X". This commit removes the requirement for
"system" as the first path component, so the mapping is now "/X" (viz,
any absolute path) to "/sdcard/symbols/X".
Modified:
trunk/coregrind/m_debuginfo/readelf.c
Modified: trunk/coregrind/m_debuginfo/readelf.c
===================================================================
--- trunk/coregrind/m_debuginfo/readelf.c 2012-02-26 21:26:00 UTC (rev 12405)
+++ trunk/coregrind/m_debuginfo/readelf.c 2012-02-27 11:02:20 UTC (rev 12406)
@@ -1090,8 +1090,8 @@
# else /* android specific hacks; look away now. */
/* The deal is: if we're looking for for a debuginfo file for some
- object /system/blah (where blah can be any path), see if we can
- find the file /sdcard/symbols/system/blah. So for example it
+ object /path/to/object (which can be any path), see if we can
+ find the file /sdcard/symbols/path/to/object. So for example it
produces the following mappings, both of which are important for
Memcheck:
@@ -1109,7 +1109,7 @@
But beware: there is no checking that the debuginfo file, if
found, matches the main file in any way.
*/
- if (0 != VG_(strncmp)(filename, "/system/", 8))
+ if (!filename || *filename != '/')
return False;
HChar* nm = ML_(dinfo_zalloc)("di.fahdi.1",
|