From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jim Blandy To: Daniel Berlin Cc: gdb-patches@sources.redhat.com Subject: Re: RFA: correctly compute addresses of embedded objects Date: Sun, 20 May 2001 13:06:00 -0000 Message-id: References: <20010518001422.142275E9DB@zwingli.cygnus.com> <87d796cff9.fsf@dynamic-addr-83-177.resnet.rochester.edu> X-SW-Source: 2001-05/msg00383.html Dan's correct --- this patch is wrong. I withdraw it. Daniel Berlin writes: > Jim Blandy writes: > > 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. > > Errr, value_addr gives back something for which arg1 is the > contents. > > We then set the VALUE_POINTED_TO_OFFSET to the VALUE_EMBEDDED_OFFSET of > arg1, to keep track of the relative location of the subobject in the > full object. > In other words, the embedded object is at the address of the enclosing > object + the embedded offset . > So the actual pointer *should* include the embedded offset, because > this is where the embedded object really is.