|
From: <sv...@va...> - 2015-02-17 13:46:34
|
Author: sewardj
Date: Tue Feb 17 13:46:26 2015
New Revision: 14938
Log:
ML_(find_name_of_pdb_file): bit a bit more careful when grepping the
output from /usr/bin/strings, so as to not get confused by substrings
".pdb" and ".PDB" when they don't appear at the end of a line.
Modified:
trunk/coregrind/m_debuginfo/readpdb.c
Modified: trunk/coregrind/m_debuginfo/readpdb.c
==============================================================================
--- trunk/coregrind/m_debuginfo/readpdb.c (original)
+++ trunk/coregrind/m_debuginfo/readpdb.c Tue Feb 17 13:46:26 2015
@@ -2436,7 +2436,7 @@
do_cleanup = True;
/* Make up the command to run, essentially:
- sh -c "strings (pename) | egrep '\.pdb|\.PDB' > (tmpname)"
+ sh -c "strings (pename) | egrep '\.pdb$|\.PDB$' > (tmpname)"
*/
const HChar* sh = "/bin/sh";
const HChar* strings = "/usr/bin/strings";
@@ -2447,7 +2447,7 @@
+ VG_(strlen)(egrep) + VG_(strlen)(tmpname)
+ 100/*misc*/;
HChar* cmd = ML_(dinfo_zalloc)("di.readpe.fnopf.cmd", cmdlen);
- VG_(sprintf)(cmd, "%s -c \"%s '%s' | %s '\\.pdb|\\.PDB' >> %s\"",
+ VG_(sprintf)(cmd, "%s -c \"%s '%s' | %s '\\.pdb$|\\.PDB$' >> %s\"",
sh, strings, pename, egrep, tmpname);
vg_assert(cmd[cmdlen-1] == 0);
if (0) VG_(printf)("QQQQQQQQ: %s\n", cmd);
|