From: Vladimir <volo.zyko@gmail.com>
To: archer@sourceware.org
Subject: Re: pretty printing of smart pointers and making function calls
Date: Wed, 08 Feb 2012 16:36:00 -0000 [thread overview]
Message-ID: <loom.20120208T150635-160@post.gmane.org> (raw)
In-Reply-To: <m34nvbhi6j.fsf@fleche.redhat.com>
Hi,
> You can work around this a little by having the base printer also print
> the pointed-to value. This is what the libstdc++ iterator printers do
> (for now).
I'm not sure I understand you correctly. Do you mean that if the user asks for a
value of variable a and pretty printer knows that it's a pointer then along with
pointer address it should print the value the pointer points too? Anyway some
reference to document or example would be useful here.
> Yes, it can be done. What you have to do is get the address of the
> function as a value. There's no super way to do this right now:
>
> http://sourceware.org/bugzilla/show_bug.cgi?id=12027
The link above mentions gdb.parse_and_eval() which does exactly what I need.
> However, you usually don't want to call functions when pretty-printing.
> For one thing, this means core-file debugging won't work.
> It is better, when possible, to do everything in Python instead.
But you are right that this doesn't work with core-file. Is there any way to
check in Python whether I debug alive process or see its dead body?
Thanks,
Vladimir
next prev parent reply other threads:[~2012-02-08 16:36 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-25 13:20 Vladimir
2012-01-31 18:26 ` Tom Tromey
2012-02-08 16:36 ` Vladimir [this message]
2012-02-22 21:38 ` Tom Tromey
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=loom.20120208T150635-160@post.gmane.org \
--to=volo.zyko@gmail.com \
--cc=archer@sourceware.org \
/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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).