From: David Taylor <taylor@cygnus.com>
To: Daniel Berlin <dberlin@redhat.com>
Cc: gdb-patches@sources.redhat.com
Subject: Re: [PATCH] Add support for tracking/evaluating dwarf2 location expressions
Date: Fri, 30 Mar 2001 13:49:00 -0000 [thread overview]
Message-ID: <200103302149.QAA25007@texas.cygnus.com> (raw)
Date: Fri, 30 Mar 2001 14:10:46 -0500 (EST)
From: Daniel Berlin <dberlin@redhat.com>
This patch adds a place in the symbol structure to store the dwarf2
location (an upcoming dwarf2read huge rewrite patch uses it), an
evaluation maachine to findvar.c, and has read_var_value use the dwarf2
location if it's available.
NOte that in struct d2_location, in the symtab.h patch, that framlocdesc
cannot be unioned with locdesc, because the symbol providing the frame
location description usually has it's own real location.
Currently, because GDB makes no use of the frame unwind info, etc, I
evaluate the frame pointer location expression for whatever is providing
it for the thing we are trying to evaluate, rather than rely what GDB
tells us the frame pointer is.
I have read that "sentence" multiple times and I still don't know what
you are trying to say. Sorry.
Yes, it's currently pointless to do this, it's just future proofing, and
what we are supposed to do, anyway.
This patch will have no effect whatosever without the dwarf2read.c
rewrite, but it won't break anything, neither, so i sepereated it out and
am submitting it now.
--Dan
2001-03-30 Daniel Berlin <dberlin@redhat.com>
* symtab.h (address_class): Add LOC_DWARF2_EXPRESSION.
(struct symbol): Add struct d2_location to store dwarf2
location expressions.
(SYMBOL_DWARF2_LOCATION, SYMBOL_DWARF2_FRAME_LOCATION): New macros.
* findvar.c (read_leb128): New function, read leb128 data from a
buffer.
I don't know what leb128 data is (and I doubt that I'm alone). I
suspect that it is something dwarf of dwarf2 specific and that this
function really belongs in another file (dwarf2read.c maybe?). At a
minimum there should probably be some sort of explanatory comment.
(evaluate_dwarf2_locdesc): New function, evaluate a given
dwarf2 location description.
This is a very dwarf2 specific change to findvar.c. What happens if
something other than dwarf2 is in use?
Also, should these functions be in here? In dwarf2read.c? Or in a
new file (dwarf2eval.c?)?
(read_var_value): Use the dwarf2 location expression if it's available.
How do you know that the location expression is NULL when you haven't
set it -- in particular, what's to prevent it from having garbage in
it?
And is it likely that some other symbol reader would someday want a
similar hook? For example, what about dwarf1? Or is dwarf2 likely to
be the only one?
next reply other threads:[~2001-03-30 13:49 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-03-30 13:49 David Taylor [this message]
2001-03-30 14:42 ` Daniel Berlin
2001-03-30 15:14 ` Andrew Cagney
2001-03-30 18:44 ` Daniel Berlin
2001-03-30 15:23 ` Elena Zannoni
2001-03-30 15:24 ` Andrew Cagney
2001-03-30 18:46 ` Daniel Berlin
2001-04-06 12:02 ` Andrew Cagney
2001-04-06 12:40 ` Daniel Berlin
-- strict thread matches above, loose matches on Subject: below --
2001-03-30 11:11 Daniel Berlin
2001-03-30 15:36 ` Andrew Cagney
2001-03-30 18:53 ` Daniel Berlin
2001-04-06 11:53 ` Andrew Cagney
2001-04-06 12:10 ` Daniel Berlin
2001-04-06 12:36 ` Kevin Buettner
2001-05-21 14:46 ` Jim Blandy
2001-05-21 18:49 ` Daniel Berlin
2001-05-22 12:46 ` Jim Blandy
2001-05-22 13:51 ` Daniel Berlin
2001-05-22 23:14 ` Jim Blandy
2001-05-23 8:51 ` Daniel Berlin
2001-05-23 11:53 ` Daniel Berlin
2001-05-23 21:53 ` Jim Blandy
2001-05-23 22:56 ` Daniel Berlin
2001-06-06 9:07 ` Andrew Cagney
2001-06-06 9:46 ` Daniel Berlin
2001-06-07 7:29 ` Andrew Cagney
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=200103302149.QAA25007@texas.cygnus.com \
--to=taylor@cygnus.com \
--cc=dberlin@redhat.com \
--cc=gdb-patches@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