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.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14938 a5019735-40e9-0310-863c-91ae7b9d1cf9
diff --git a/coregrind/m_debuginfo/readpdb.c b/coregrind/m_debuginfo/readpdb.c
index be0cd3f..1adfda2 100644
--- a/coregrind/m_debuginfo/readpdb.c
+++ b/coregrind/m_debuginfo/readpdb.c
@@ -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);