New python function gdb.lookup_objfile.
gdb/ChangeLog: * NEWS: Mention gdb.lookup_objfile. * python/python.c (GdbMethods): Add lookup_objfile. * python/python-internal.h (gdbpy_lookup_objfile): Declare. * python/py-objfile.c: #include "symtab.h". (objfpy_build_id_ok, objfpy_build_id_matches): New functions. (objfpy_lookup_objfile_by_name): New function. (objfpy_lookup_objfile_by_build_id): New function. (gdbpy_lookup_objfile): New function. gdb/doc/ChangeLog: * python.texi (Objfiles In Python): Document gdb.lookup_objfile. gdb/testsuite/ChangeLog: * lib/gdb-python.exp (get_python_valueof): New function. * gdb.python/py-objfile.exp: Add tests for gdb.lookup_objfile.
This commit is contained in:
parent
f161c17134
commit
6dddd6a574
10 changed files with 237 additions and 1 deletions
|
@ -1956,6 +1956,14 @@ a boolean indicating if name is a field of the current implied argument\n\
|
|||
METH_VARARGS | METH_KEYWORDS,
|
||||
"lookup_global_symbol (name [, domain]) -> symbol\n\
|
||||
Return the symbol corresponding to the given name (or None)." },
|
||||
|
||||
{ "lookup_objfile", (PyCFunction) gdbpy_lookup_objfile,
|
||||
METH_VARARGS | METH_KEYWORDS,
|
||||
"lookup_objfile (name, [by_build_id]) -> objfile\n\
|
||||
Look up the specified objfile.\n\
|
||||
If by_build_id is True, the objfile is looked up by using name\n\
|
||||
as its build id." },
|
||||
|
||||
{ "block_for_pc", gdbpy_block_for_pc, METH_VARARGS,
|
||||
"Return the block containing the given pc value, or None." },
|
||||
{ "solib_name", gdbpy_solib_name, METH_VARARGS,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue