diff options
author | Doug Evans <xdje42@gmail.com> | 2014-12-23 07:21:10 -0800 |
---|---|---|
committer | Doug Evans <xdje42@gmail.com> | 2014-12-23 07:21:10 -0800 |
commit | 08be3fe322244a3684d007d9282e225fc215f5d8 (patch) | |
tree | 083e30284643e51dbc49b6b3ab9a3e3a5a0e6e35 /gdb/python/py-symbol.c | |
parent | 4347085ad3e84bdc1f91e7121cedf3e79a9467fb (diff) | |
download | gdb-08be3fe322244a3684d007d9282e225fc215f5d8.zip gdb-08be3fe322244a3684d007d9282e225fc215f5d8.tar.gz gdb-08be3fe322244a3684d007d9282e225fc215f5d8.tar.bz2 |
Replace some symbol accessor macros with functions.
gdb/ChangeLog:
* symtab.h (SYMBOL_SYMTAB): Delete
(SYMBOL_OBJFILE): Delete.
(symbol_symtab, symbol_set_symtab): Declare.
(symbol_objfile, symbol_arch): Declare.
* symtab.c (symbol_symtab): Replaces SYMBOL_SYMTAB. All uses updated.
All references to symbol->symtab redirected through here.
(symbol_set_symtab): New function. All assignments to SYMBOL_SYMTAB
redirected through here.
(symbol_arch): New function.
(symbol_objfile): New function. Replaces SYMBOL_OBJFILE.
All uses updated.
* cp-namespace.c (cp_lookup_symbol_imports_or_template): Call
symbol_arch.
* findvar.c (default_read_var_value): Call symbol_arch.
* guile/scm-frame.c (gdbscm_frame_block): Call symbol_objfile.
* jv-lang.c (add_class_symtab_symbol): Call symbol_arch.
* printcmd.c (address_info): Call symbol_arch.
* tracepoint.c (scope_info): Call symbol_arch.
Diffstat (limited to 'gdb/python/py-symbol.c')
-rw-r--r-- | gdb/python/py-symbol.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/gdb/python/py-symbol.c b/gdb/python/py-symbol.c index caf0a74..62fde64 100644 --- a/gdb/python/py-symbol.c +++ b/gdb/python/py-symbol.c @@ -87,7 +87,7 @@ sympy_get_symtab (PyObject *self, void *closure) SYMPY_REQUIRE_VALID (self, symbol); - return symtab_to_symtab_object (SYMBOL_SYMTAB (symbol)); + return symtab_to_symtab_object (symbol_symtab (symbol)); } static PyObject * @@ -290,15 +290,14 @@ set_symbol (symbol_object *obj, struct symbol *symbol) { obj->symbol = symbol; obj->prev = NULL; - if (SYMBOL_SYMTAB (symbol)) + if (symbol_symtab (symbol) != NULL) { - obj->next = objfile_data (SYMBOL_OBJFILE (symbol), - sympy_objfile_data_key); + struct objfile *objfile = symbol_objfile (symbol); + obj->next = objfile_data (objfile, sympy_objfile_data_key); if (obj->next) obj->next->prev = obj; - set_objfile_data (SYMBOL_OBJFILE (symbol), - sympy_objfile_data_key, obj); + set_objfile_data (objfile, sympy_objfile_data_key, obj); } else obj->next = NULL; @@ -334,9 +333,10 @@ sympy_dealloc (PyObject *obj) if (sym_obj->prev) sym_obj->prev->next = sym_obj->next; - else if (sym_obj->symbol && SYMBOL_SYMTAB (sym_obj->symbol)) + else if (sym_obj->symbol != NULL + && symbol_symtab (sym_obj->symbol) != NULL) { - set_objfile_data (SYMBOL_OBJFILE (sym_obj->symbol), + set_objfile_data (symbol_objfile (sym_obj->symbol), sympy_objfile_data_key, sym_obj->next); } if (sym_obj->next) |