diff options
author | Phil Muldoon <pmuldoon@redhat.com> | 2013-11-11 19:49:45 +0000 |
---|---|---|
committer | Phil Muldoon <pmuldoon@redhat.com> | 2013-11-11 19:49:45 +0000 |
commit | bc79de95db1005e1cefc18729eca9e9d5f771c91 (patch) | |
tree | 0c20455a1659da6d02e8f03df6123ec8278c208e /gdb/python/py-symtab.c | |
parent | 67dc82bc511e35ef134952014b4deb2fdcf10676 (diff) | |
download | binutils-bc79de95db1005e1cefc18729eca9e9d5f771c91.zip binutils-bc79de95db1005e1cefc18729eca9e9d5f771c91.tar.gz binutils-bc79de95db1005e1cefc18729eca9e9d5f771c91.tar.bz2 |
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.
Diffstat (limited to 'gdb/python/py-symtab.c')
-rw-r--r-- | gdb/python/py-symtab.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/gdb/python/py-symtab.c b/gdb/python/py-symtab.c index 006946c..c4a3fea 100644 --- a/gdb/python/py-symtab.c +++ b/gdb/python/py-symtab.c @@ -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 */ }; |