Python API: Getting symbol by address

Simon Marchi simon.marchi@polymtl.ca
Thu Dec 21 22:24:00 GMT 2017


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



More information about the Gdb mailing list