From: Daniel Berlin <dan@cgsoftware.com>
To: Jim Blandy <jimb@zwingli.cygnus.com>
Cc: gdb-patches@sources.redhat.com
Subject: Re: RFA: correctly compute addresses of embedded objects
Date: Fri, 18 May 2001 18:10:00 -0000 [thread overview]
Message-ID: <87d796cff9.fsf@dynamic-addr-83-177.resnet.rochester.edu> (raw)
In-Reply-To: <20010518001422.142275E9DB@zwingli.cygnus.com>
Jim Blandy <jimb@zwingli.cygnus.com> writes:
> 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.
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.
Otherwise, you've not only made it not point to the embedded object,
you've screwed the POINTED_TO_OFFSET calculation as well.
I'm not quite sure of what problem you are trying to fix, maybe if you
could throw me a testcase?
--
"I owed my friend George $25. For about three weeks I owed it to
him. The whole time I had the money on me -- he didn't know it.
Walking through New York City, 2:30 in the morning and got held
up. He said, "Gimme all your money." I said, "Wait a minute."
I said, "George, here's the 25 dollars I owe you." The the
thief took a thousand dollars out of his own money and he gave
it to George. At gunpoint made me borrow a thousand dollars
from George.
"-Steven Wright
next prev parent reply other threads:[~2001-05-18 18:10 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-05-18 17:29 Jim Blandy
2001-05-18 18:10 ` Daniel Berlin [this message]
2001-05-20 13:06 ` Jim Blandy
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87d796cff9.fsf@dynamic-addr-83-177.resnet.rochester.edu \
--to=dan@cgsoftware.com \
--cc=gdb-patches@sources.redhat.com \
--cc=jimb@zwingli.cygnus.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox