This is the mail archive of the gdb-prs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug python/12918] Can not get symtab_and_line object given anarbitrary program counter


http://sourceware.org/bugzilla/show_bug.cgi?id=12918

matt rice <ratmice at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ratmice at gmail dot com

--- Comment #1 from matt rice <ratmice at gmail dot com> 2011-07-04 07:06:56 UTC ---
you can get a symtab_and_line object for an arbitrary address by using the
decode_line function (see the Basic Python section of the manual) and passing
in "*0xaddr" as the argument.

e.g. 
(gdb) python print gdb.decode_line("*" +
str(gdb.selected_frame().find_sal().pc))
(None, (<gdb.Symtab_and_line object at 0x7f55269cbe10>,))
(gdb)

I've suggested adding a reference to decode_line from the gdb.symtab_and_line
section.
If you have any recommendations how to further clarify the manual please let us
know.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]