From: Phil Muldoon <pmuldoon@redhat.com>
To: Tom Tromey <tromey@redhat.com>
Cc: Chris Johns <chris@contemporary.net.au>, gdb@sourceware.org
Subject: Re: Reading a static variable in Python
Date: Thu, 11 Mar 2010 17:15:00 -0000 [thread overview]
Message-ID: <4B99252A.1070103@redhat.com> (raw)
In-Reply-To: <m3sk86g5qg.fsf@fleche.redhat.com>
On 03/11/2010 04:53 PM, Tom Tromey wrote:
>>>>>> "Chris" == Chris Johns <chris@contemporary.net.au> writes:
>
> Tom> Use gdb.parse_and_eval.
>
> Chris> Nice. This is an excellent solution. I suppose being an expression it
> Chris> can do the pointer maths as well. I was looking at ways to construct a
> Chris> gdb.Value with a gdb.Symbol as an argument.
>
> Yes, strangely there doesn't seem to be a way to do that.
> If you want this, feel free to file a bug report for it...
Frame's read_var function creates a gdb.Value from a given gdb.Symbol,
but obviously one needs the frame and the symbol for that. There was
a stub in the gdb.Symbol code to do this without a frame, but it was
very limited so I removed it. Frame's function read_var uses
read_var_value which needs a frame (well, for some reads -
symbol_read_needs_frame returns a mixed bag of results). Not sure if
it is possible to construct a value from a symbol without the frame in
all cases?
Cheers,
Phil
next prev parent reply other threads:[~2010-03-11 17:15 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-10 3:38 Chris Johns
2010-03-10 17:05 ` Tom Tromey
2010-03-11 1:49 ` Chris Johns
2010-03-11 16:53 ` Tom Tromey
2010-03-11 17:15 ` Phil Muldoon [this message]
2010-03-11 17:58 ` Tom Tromey
2010-03-11 23:40 ` Chris Johns
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=4B99252A.1070103@redhat.com \
--to=pmuldoon@redhat.com \
--cc=chris@contemporary.net.au \
--cc=gdb@sourceware.org \
--cc=tromey@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