This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RFC: copy full value location


Daniel's said in private mail that this looked fine to him; I'll put
it up in case other folks have comments, and then commit.  (It's
almost obvious anyway.)

gdb/ChangeLog:
2006-12-07  Jim Blandy  <jimb@codesourcery.com>

	* value.c (value_copy): Copy the full 'location' contents, instead
	of assuming that copying ADDRESS will bring over everything in the
	union.

Index: gdb/value.c
===================================================================
RCS file: /cvs/src/src/gdb/value.c,v
retrieving revision 1.36
diff -u -r1.36 value.c
--- gdb/value.c	31 Mar 2006 10:36:18 -0000	1.36
+++ gdb/value.c	8 Dec 2006 01:29:37 -0000
@@ -551,7 +551,7 @@
   struct value *val = allocate_value (encl_type);
   val->type = arg->type;
   VALUE_LVAL (val) = VALUE_LVAL (arg);
-  VALUE_ADDRESS (val) = VALUE_ADDRESS (arg);
+  val->location = arg->location;
   val->offset = arg->offset;
   val->bitpos = arg->bitpos;
   val->bitsize = arg->bitsize;


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]