From: Andrew Cagney <cagney@gnu.org>
To: gdb@sources.redhat.com
Subject: Re: a value has-a location
Date: Mon, 07 Feb 2005 20:17:00 -0000 [thread overview]
Message-ID: <4207CBFC.3010900@gnu.org> (raw)
In-Reply-To: <4187A414.5060804@gnu.org>
Andrew Cagney wrote:
> (back to this one again)
>
> We've the relationship:
>
> LOCATION ----<> VALUE <>----- TYPE
> .
> /_\
> |
> +-------------------------.
> | |
> DWARF-2 LOCATION LEGACY LOCATION
Now that I've got "struct value" more or less under control, I've
sufficient information to expand refine this. First the above becomes:
TYPE -----<> VALUE <>----- CONTENT
i.e.: VALUE has-a TYPE; VALUE has-a CONTENT
When it comes to CONTENT, that can be further refined:
1 N
CONTENT <>------ PIECE
<>
\
`---- BUFFER
i.e., CONTENT has-a 1:N PIECE; CONTENT has-a BUFFER.
So what was LOCATION has been expanded into CONTENT (rough
correspondence to the existing value->contents) and PIECE (rough
correspondence to DW_OP_piece).
Looking at the code, the existing VALUE fields, dependent on whether
they make up part of the content (e.g., value->contents) or the
content's location (aka piece) (e.g., value->lval), need to be moved to
either CONTENT or PIECE. For fields moved to CONTENT, things are
straight forward:
Old: value->aligner.contents
New: value->contents->buffer
Old: value->lazy
New: value->contents->lazy
However, for the VALUE fields that describe the actual location (i.e.,
PIECE) there's a problem - there are now N PIECEs. Initially I'll
assume there's only one piece giving:
Old: value->lval
Hack: value->contents->piece[0]->lval
(the assume-one-piece methods will be DEPRECATED). Going forward the
code can be updated to eliminate that assumption, instead iterating over
multiple pieces.
Andrew
prev parent reply other threads:[~2005-02-07 20:14 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-11-02 15:14 Andrew Cagney
2004-11-02 15:32 ` Joel Brobecker
2005-02-07 20:17 ` Andrew Cagney [this message]
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=4207CBFC.3010900@gnu.org \
--to=cagney@gnu.org \
--cc=gdb@sources.redhat.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