2013-11-11 Phil Muldoon <pmuldoon@redhat.com>
PR python/15629 * NEWS: Add linetable feature. * Makefile.in (SUBDIR_PYTHON_OBS): Add py-linetable entries. * python/py-linetable.c: New file. * python/py-symtab.c (stpy_get_linetable): New function. * python/python-internal.h (symtab_to_linetable_object): Declare. (gdbpy_initialize_linetable): Ditto. * python/python.c (_initialize_python): Call gdbpy_initialize_linetable. 2013-11-11 Phil Muldoon <pmuldoon@redhat.com> * gdb.python/py-linetable.S: New file. * gdb.python/py-linetable.c: New file. * gdb.python/py-linetable.exp: New file. 2013-11-11 Phil Muldoon <pmuldoon@redhat.com> * gdb.texinfo (Symbol Tables In Python): Add linetable method entry. (Line Tables In Python): New node.
This commit is contained in:
parent
67dc82bc51
commit
bc79de95db
13 changed files with 1241 additions and 1 deletions
|
@ -186,6 +186,20 @@ stpy_static_block (PyObject *self, PyObject *args)
|
|||
return block_to_block_object (block, symtab->objfile);
|
||||
}
|
||||
|
||||
/* Implementation of gdb.Symtab.linetable (self) -> gdb.Linetable.
|
||||
Returns a gdb.Linetable object corresponding to this symbol
|
||||
table. */
|
||||
|
||||
static PyObject *
|
||||
stpy_get_linetable (PyObject *self, PyObject *args)
|
||||
{
|
||||
struct symtab *symtab = NULL;
|
||||
|
||||
STPY_REQUIRE_VALID (self, symtab);
|
||||
|
||||
return symtab_to_linetable_object (self);
|
||||
}
|
||||
|
||||
static PyObject *
|
||||
salpy_str (PyObject *self)
|
||||
{
|
||||
|
@ -532,6 +546,9 @@ Return the global block of the symbol table." },
|
|||
{ "static_block", stpy_static_block, METH_NOARGS,
|
||||
"static_block () -> gdb.Block.\n\
|
||||
Return the static block of the symbol table." },
|
||||
{ "linetable", stpy_get_linetable, METH_NOARGS,
|
||||
"linetable () -> gdb.Linetable.\n\
|
||||
Return the Linetable associated with this symbol table" },
|
||||
{NULL} /* Sentinel */
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue