From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jim Blandy To: gdb-patches@sources.redhat.com Subject: RFA: correctly compute addresses of embedded objects Date: Fri, 18 May 2001 17:29:00 -0000 Message-id: <20010518001422.142275E9DB@zwingli.cygnus.com> X-SW-Source: 2001-05/msg00359.html 2001-05-17 Jim Blandy * 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 ... */