diff options
author | Simon Marchi <simon.marchi@efficios.com> | 2021-11-20 21:54:11 -0500 |
---|---|---|
committer | Simon Marchi <simon.marchi@efficios.com> | 2022-02-06 16:03:46 -0500 |
commit | 652099717dbb767c9d3eaed4c533486dd99d5e5b (patch) | |
tree | 1165879a9bb9e6d433559addb0e492e602d7c4c5 /gdb/python | |
parent | 012cfab919e7da355b2ac7f86674211cbce26041 (diff) | |
download | binutils-gdb-652099717dbb767c9d3eaed4c533486dd99d5e5b.tar.gz |
gdb: remove SYMTAB_OBJFILE macro
Remove the macro, replace with an equivalent method.
Change-Id: I8f9ecd290ad28502e53c1ceca5006ba78bf042eb
Diffstat (limited to 'gdb/python')
-rw-r--r-- | gdb/python/py-symtab.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/gdb/python/py-symtab.c b/gdb/python/py-symtab.c index 33657f1e6e4..cb28264a03f 100644 --- a/gdb/python/py-symtab.c +++ b/gdb/python/py-symtab.c @@ -119,7 +119,7 @@ stpy_get_objfile (PyObject *self, void *closure) STPY_REQUIRE_VALID (self, symtab); - return objfile_to_objfile_object (SYMTAB_OBJFILE (symtab)).release (); + return objfile_to_objfile_object (symtab->objfile ()).release (); } /* Getter function for symtab.producer. */ @@ -183,7 +183,7 @@ stpy_global_block (PyObject *self, PyObject *args) blockvector = symtab->blockvector (); block = BLOCKVECTOR_BLOCK (blockvector, GLOBAL_BLOCK); - return block_to_block_object (block, SYMTAB_OBJFILE (symtab)); + return block_to_block_object (block, symtab->objfile ()); } /* Return the STATIC_BLOCK of the underlying symtab. */ @@ -199,7 +199,7 @@ stpy_static_block (PyObject *self, PyObject *args) blockvector = symtab->blockvector (); block = BLOCKVECTOR_BLOCK (blockvector, STATIC_BLOCK); - return block_to_block_object (block, SYMTAB_OBJFILE (symtab)); + return block_to_block_object (block, symtab->objfile ()); } /* Implementation of gdb.Symtab.linetable (self) -> gdb.LineTable. @@ -247,7 +247,7 @@ stpy_dealloc (PyObject *obj) symtab->prev->next = symtab->next; else if (symtab->symtab) { - set_objfile_data (SYMTAB_OBJFILE (symtab->symtab), + set_objfile_data (symtab->symtab->objfile (), stpy_objfile_data_key, symtab->next); } if (symtab->next) @@ -330,7 +330,7 @@ salpy_dealloc (PyObject *self) self_sal->prev->next = self_sal->next; else if (self_sal->symtab != Py_None) set_objfile_data - (SYMTAB_OBJFILE (symtab_object_to_symtab (self_sal->symtab)), + (symtab_object_to_symtab (self_sal->symtab)->objfile (), salpy_objfile_data_key, self_sal->next); if (self_sal->next) @@ -378,12 +378,12 @@ set_sal (sal_object *sal_obj, struct symtab_and_line sal) symtab *symtab = symtab_object_to_symtab (sal_obj->symtab); sal_obj->next - = ((sal_object *) objfile_data (SYMTAB_OBJFILE (symtab), + = ((sal_object *) objfile_data (symtab->objfile (), salpy_objfile_data_key)); if (sal_obj->next) sal_obj->next->prev = sal_obj; - set_objfile_data (SYMTAB_OBJFILE (symtab), + set_objfile_data (symtab->objfile (), salpy_objfile_data_key, sal_obj); } else @@ -406,10 +406,10 @@ set_symtab (symtab_object *obj, struct symtab *symtab) { obj->next = ((symtab_object *) - objfile_data (SYMTAB_OBJFILE (symtab), stpy_objfile_data_key)); + objfile_data (symtab->objfile (), stpy_objfile_data_key)); if (obj->next) obj->next->prev = obj; - set_objfile_data (SYMTAB_OBJFILE (symtab), stpy_objfile_data_key, obj); + set_objfile_data (symtab->objfile (), stpy_objfile_data_key, obj); } else obj->next = NULL; |