This is the mail archive of the gdb-patches@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] |
Hi all, I wanted a way to get the actual line number given a PC value using the Python API. The currently available Symtab_and_line.line gives the line number which the user thinks the current execution is, but not the actual. Attached is a patch which adds gdb.find_pc_line corresponding to the C function find_pc_line. 2012-05-07 Siva Chandra Reddy <sivachandra@google.com> Add a new function gdb.find_pc_line to the Python API. * python/python.c (gdbpy_find_pc_line): New function which implements gdb.find_pc_line. doc/ * gdb.texinfo (Basic Python): Add description about the function gdb.find_pc_line testsuite/ * gdb.python/python.c: Add a new breakpoint location. * gdb.python/python.exp: Add tests to test gdb.find_pc_line. Thanks, Siva Chandra
Attachment:
pc_line_patch_v1.txt
Description: Text document
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |