This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
RFA: correctly compute addresses of embedded objects
- To: gdb-patches at sources dot redhat dot com
- Subject: RFA: correctly compute addresses of embedded objects
- From: Jim Blandy <jimb at zwingli dot cygnus dot com>
- Date: Thu, 17 May 2001 19:14:22 -0500 (EST)
2001-05-17 Jim Blandy <jimb@redhat.com>
* valops.c (value_addr): Don't include VALUE_EMBEDDED_OFFSET in
the pointer value we return. It should point at the embedded
object ARG1 represents, not at the enclosing object ARG1 might
also be holding.
*** gdb/valops.c.base~ Tue Apr 24 13:50:06 2001
--- gdb/valops.c Thu May 17 14:58:14 2001
***************
*** 960,967 ****
/* Get target memory address */
arg2 = value_from_pointer (lookup_pointer_type (VALUE_TYPE (arg1)),
(VALUE_ADDRESS (arg1)
! + VALUE_OFFSET (arg1)
! + VALUE_EMBEDDED_OFFSET (arg1)));
/* This may be a pointer to a base subobject; so remember the
full derived object's type ... */
--- 960,966 ----
/* Get target memory address */
arg2 = value_from_pointer (lookup_pointer_type (VALUE_TYPE (arg1)),
(VALUE_ADDRESS (arg1)
! + VALUE_OFFSET (arg1)));
/* This may be a pointer to a base subobject; so remember the
full derived object's type ... */