Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Simon Marchi <simon.marchi@polymtl.ca>
To: Roman Popov <ripopov@gmail.com>
Cc: gdb@sourceware.org
Subject: Re: Python API: Getting symbol by address
Date: Thu, 21 Dec 2017 22:24:00 -0000	[thread overview]
Message-ID: <cbab93222dec1eb79473740651a00baf@polymtl.ca> (raw)
In-Reply-To: <CAATAM3Ep+Wr-UhM6OKTSmhxwVM3r7vWfHpfSRW=ruc=GsuZ5ng@mail.gmail.com>

On 2017-12-21 13:20, Roman Popov wrote:
> Hello,
> I have collection in C++ that stores pointers to functions and methods. 
> I
> want to pretty-print pointed method and functions names.
> 
> It is possible using GDB shell, for example:
> 
> (gdb) info symbol 0x405ece
> 
> top::test_thread() in section .text of test_procs
> 
> 
> However I found no way to do the same using Python API.  Why such
> limitation?
> 
> P/S Same question on stackoverflow :
> https://stackoverflow.com/questions/47916564/gdb-python-api-getting-symbol-name-from-address
> 
> Thanks,
> Roman

Hi Roman,

As most things in the Python API (and GDB in general), it's likely 
because no one took the time to do it.  I don't see any technical reason 
not to have it.  If you take a shot at writing a patch for this, feel 
free to ask if you are blocked.

Thanks,

Simon


  reply	other threads:[~2017-12-21 22:24 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-21 18:20 Roman Popov
2017-12-21 22:24 ` Simon Marchi [this message]
2017-12-21 22:56   ` Roman Popov

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=cbab93222dec1eb79473740651a00baf@polymtl.ca \
    --to=simon.marchi@polymtl.ca \
    --cc=gdb@sourceware.org \
    --cc=ripopov@gmail.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