This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
FYI: parse_find_args -vs- value_contents_raw
- From: Tom Tromey <tromey at redhat dot com>
- To: gdb-patches at sourceware dot org
- Date: Thu, 27 May 2010 12:53:30 -0600
- Subject: FYI: parse_find_args -vs- value_contents_raw
- Reply-to: Tom Tromey <tromey at redhat dot com>
I'm checking this in.
findcmd.c:parse_find_args uses value_contents_raw, but I think
incorrectly so, as it never writes to the buffer. This patch changes it
to use value_contents. This could conceivably result in a difference if
it were possible for 'v' to be a lazy value, but I believe this case
would actually be a latent bug.
Built and regtested on x86-64 (compile farm).
Tom
2010-05-27 Tom Tromey <tromey@redhat.com>
* findcmd.c (parse_find_args): Use value_contents, not
value_contents_raw.
Index: findcmd.c
===================================================================
RCS file: /cvs/src/src/gdb/findcmd.c,v
retrieving revision 1.12
diff -u -r1.12 findcmd.c
--- findcmd.c 14 May 2010 19:27:05 -0000 1.12
+++ findcmd.c 27 May 2010 18:47:02 -0000
@@ -211,7 +211,7 @@
}
else
{
- memcpy (pattern_buf_end, value_contents_raw (v), val_bytes);
+ memcpy (pattern_buf_end, value_contents (v), val_bytes);
pattern_buf_end += val_bytes;
}