|
From: <sv...@va...> - 2005-07-12 23:29:05
|
Author: njn
Date: 2005-07-13 00:28:59 +0100 (Wed, 13 Jul 2005)
New Revision: 4146
Log:
Fixed bug #88678 -- debug info is now correctly gathered for files
containing spaces.
Added:
trunk/memcheck/tests/with-space.stderr.exp
trunk/memcheck/tests/with-space.stdout.exp
trunk/memcheck/tests/with-space.vgtest
Modified:
trunk/coregrind/m_aspacemgr/read_procselfmaps.c
Modified: trunk/coregrind/m_aspacemgr/read_procselfmaps.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/coregrind/m_aspacemgr/read_procselfmaps.c 2005-07-10 16:57:24 U=
TC (rev 4145)
+++ trunk/coregrind/m_aspacemgr/read_procselfmaps.c 2005-07-12 23:28:59 U=
TC (rev 4146)
@@ -229,12 +229,17 @@
read_line_ok:
=20
/* Try and find the name of the file mapped to this segment, if
- it exists. */
- while (procmap_buf[i] !=3D '\n' && i < buf_n_tot-1) i++;
+ it exists. Note that files can contains spaces. */
+
+ // Move i to the next non-space char, which should be either a '/'=
or
+ // a newline.
+ while (procmap_buf[i] =3D=3D ' ' && i < buf_n_tot-1) i++;
+ =20
+ // Move i_eol to the end of the line.
i_eol =3D i;
- i--;
- while (!VG_(isspace)(procmap_buf[i]) && i >=3D 0) i--;
- i++;
+ while (procmap_buf[i_eol] !=3D '\n' && i_eol < buf_n_tot-1) i_eol+=
+;
+
+ // If there's a filename...
if (i < i_eol-1 && procmap_buf[i] =3D=3D '/') {
/* Minor hack: put a '\0' at the filename end for the call to
'record_mapping', then restore the old char with 'tmp'. */
Added: trunk/memcheck/tests/with-space.stderr.exp
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/memcheck/tests/with-space.stderr.exp 2005-07-10 16:57:24 UTC (r=
ev 4145)
+++ trunk/memcheck/tests/with-space.stderr.exp 2005-07-12 23:28:59 UTC (r=
ev 4146)
@@ -0,0 +1,2 @@
+Conditional jump or move depends on uninitialised value(s)
+ at 0x........: main (manuel1.c:7)
Added: trunk/memcheck/tests/with-space.stdout.exp
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/memcheck/tests/with-space.stdout.exp 2005-07-10 16:57:24 UTC (r=
ev 4145)
+++ trunk/memcheck/tests/with-space.stdout.exp 2005-07-12 23:28:59 UTC (r=
ev 4146)
@@ -0,0 +1 @@
+x =3D 88
Added: trunk/memcheck/tests/with-space.vgtest
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/memcheck/tests/with-space.vgtest 2005-07-10 16:57:24 UTC (rev 4=
145)
+++ trunk/memcheck/tests/with-space.vgtest 2005-07-12 23:28:59 UTC (rev 4=
146)
@@ -0,0 +1,6 @@
+# Use the "prereq" command to copy manuel1 to a filename containing a sp=
ace.
+# This used to not work properly, because the debug info would not be re=
ad
+# correctly for filenames containing spaces (bug #88678).
+prereq: cp manuel1 'with space'
+prog: 'with space'
+vgopts: -q
|
|
From: Josef W. <Jos...@gm...> - 2005-07-13 08:32:17
|
On Wednesday 13 July 2005 01:29, sv...@va... wrote: > Author: njn > Fixed bug #88678 -- debug info is now correctly gathered for files > containing spaces. Wow, that's quick! If there ever will be a 2.4.1, I suppose that a backport would be good. Josef |