aboutsummaryrefslogtreecommitdiff
path: root/gdb/python
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2022-04-17 20:00:59 -0600
committerTom Tromey <tom@tromey.com>2022-04-20 09:28:40 -0600
commit4206d69e96ac401cf2975f37bf4e4d3a3c838313 (patch)
tree6301edfeea773f593e1949a30831c442bf87b90f /gdb/python
parentbcd6845e2b66adb58d36eb1d9b8fbf71900b517d (diff)
downloadgdb-4206d69e96ac401cf2975f37bf4e4d3a3c838313.zip
gdb-4206d69e96ac401cf2975f37bf4e4d3a3c838313.tar.gz
gdb-4206d69e96ac401cf2975f37bf4e4d3a3c838313.tar.bz2
Replace symbol_symtab with symbol::symtab
This turns symbol_symtab into a method on symbol. It also replaces symbol_set_symtab with a method.
Diffstat (limited to 'gdb/python')
-rw-r--r--gdb/python/py-symbol.c6
-rw-r--r--gdb/python/python.c2
2 files changed, 4 insertions, 4 deletions
diff --git a/gdb/python/py-symbol.c b/gdb/python/py-symbol.c
index 5d47550..414a310 100644
--- a/gdb/python/py-symbol.c
+++ b/gdb/python/py-symbol.c
@@ -91,7 +91,7 @@ sympy_get_symtab (PyObject *self, void *closure)
if (!symbol->is_objfile_owned ())
Py_RETURN_NONE;
- return symtab_to_symtab_object (symbol_symtab (symbol));
+ return symtab_to_symtab_object (symbol->symtab ());
}
static PyObject *
@@ -303,7 +303,7 @@ set_symbol (symbol_object *obj, struct symbol *symbol)
obj->symbol = symbol;
obj->prev = NULL;
if (symbol->is_objfile_owned ()
- && symbol_symtab (symbol) != NULL)
+ && symbol->symtab () != NULL)
{
struct objfile *objfile = symbol->objfile ();
@@ -349,7 +349,7 @@ sympy_dealloc (PyObject *obj)
sym_obj->prev->next = sym_obj->next;
else if (sym_obj->symbol != NULL
&& sym_obj->symbol->is_objfile_owned ()
- && symbol_symtab (sym_obj->symbol) != NULL)
+ && sym_obj->symbol->symtab () != NULL)
{
set_objfile_data (sym_obj->symbol->objfile (),
sympy_objfile_data_key, sym_obj->next);
diff --git a/gdb/python/python.c b/gdb/python/python.c
index 7a9c8c1..11aaa7a 100644
--- a/gdb/python/python.c
+++ b/gdb/python/python.c
@@ -831,7 +831,7 @@ gdbpy_rbreak (PyObject *self, PyObject *args, PyObject *kw)
if (p.msymbol.minsym == NULL)
{
- struct symtab *symtab = symbol_symtab (p.symbol);
+ struct symtab *symtab = p.symbol->symtab ();
const char *fullname = symtab_to_fullname (symtab);
symbol_name = fullname;