aboutsummaryrefslogtreecommitdiff
path: root/gdb/python/py-symtab.c
diff options
context:
space:
mode:
authorDoug Evans <xdje42@gmail.com>2014-11-18 09:19:11 -0800
committerDoug Evans <xdje42@gmail.com>2014-11-18 09:19:11 -0800
commiteb822aa6d0f2cdc1a3125da084b96c5bbe32cb86 (patch)
treed26ba8ac15567c8accf2d4bb9b24a4ed83d00a1d /gdb/python/py-symtab.c
parent98387a2917d136b1acbaa9229d5b6a787d9efd54 (diff)
downloadgdb-eb822aa6d0f2cdc1a3125da084b96c5bbe32cb86.zip
gdb-eb822aa6d0f2cdc1a3125da084b96c5bbe32cb86.tar.gz
gdb-eb822aa6d0f2cdc1a3125da084b96c5bbe32cb86.tar.bz2
SYMTAB_OBJFILE: New macro.
gdb/ChangeLog: * symtab.h (SYMTAB_OBJFILE): New macro. All uses of member symtab.objfile updated to use it.
Diffstat (limited to 'gdb/python/py-symtab.c')
-rw-r--r--gdb/python/py-symtab.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/gdb/python/py-symtab.c b/gdb/python/py-symtab.c
index 1065ba3..e4e3ec1 100644
--- a/gdb/python/py-symtab.c
+++ b/gdb/python/py-symtab.c
@@ -121,7 +121,7 @@ stpy_get_objfile (PyObject *self, void *closure)
STPY_REQUIRE_VALID (self, symtab);
- result = objfile_to_objfile_object (symtab->objfile);
+ result = objfile_to_objfile_object (SYMTAB_OBJFILE (symtab));
Py_XINCREF (result);
return result;
}
@@ -186,7 +186,7 @@ stpy_global_block (PyObject *self, PyObject *args)
blockvector = BLOCKVECTOR (symtab);
block = BLOCKVECTOR_BLOCK (blockvector, GLOBAL_BLOCK);
- return block_to_block_object (block, symtab->objfile);
+ return block_to_block_object (block, SYMTAB_OBJFILE (symtab));
}
/* Return the STATIC_BLOCK of the underlying symtab. */
@@ -202,7 +202,7 @@ stpy_static_block (PyObject *self, PyObject *args)
blockvector = BLOCKVECTOR (symtab);
block = BLOCKVECTOR_BLOCK (blockvector, STATIC_BLOCK);
- return block_to_block_object (block, symtab->objfile);
+ return block_to_block_object (block, SYMTAB_OBJFILE (symtab));
}
/* Implementation of gdb.Symtab.linetable (self) -> gdb.Linetable.
@@ -252,7 +252,7 @@ stpy_dealloc (PyObject *obj)
symtab->prev->next = symtab->next;
else if (symtab->symtab)
{
- set_objfile_data (symtab->symtab->objfile,
+ set_objfile_data (SYMTAB_OBJFILE (symtab->symtab),
stpy_objfile_data_key, symtab->next);
}
if (symtab->next)
@@ -333,7 +333,7 @@ salpy_dealloc (PyObject *self)
if (self_sal->prev)
self_sal->prev->next = self_sal->next;
else if (self_sal->symtab != (symtab_object * ) Py_None)
- set_objfile_data (self_sal->symtab->symtab->objfile,
+ set_objfile_data (SYMTAB_OBJFILE (self_sal->symtab->symtab),
salpy_objfile_data_key, self_sal->next);
if (self_sal->next)
@@ -377,12 +377,12 @@ set_sal (sal_object *sal_obj, struct symtab_and_line sal)
objfile cleanup observer linked list. */
if (sal_obj->symtab != (symtab_object *)Py_None)
{
- sal_obj->next = objfile_data (sal_obj->symtab->symtab->objfile,
+ sal_obj->next = objfile_data (SYMTAB_OBJFILE (sal_obj->symtab->symtab),
salpy_objfile_data_key);
if (sal_obj->next)
sal_obj->next->prev = sal_obj;
- set_objfile_data (sal_obj->symtab->symtab->objfile,
+ set_objfile_data (SYMTAB_OBJFILE (sal_obj->symtab->symtab),
salpy_objfile_data_key, sal_obj);
}
else
@@ -403,10 +403,11 @@ set_symtab (symtab_object *obj, struct symtab *symtab)
obj->prev = NULL;
if (symtab)
{
- obj->next = objfile_data (symtab->objfile, stpy_objfile_data_key);
+ obj->next = objfile_data (SYMTAB_OBJFILE (symtab),
+ stpy_objfile_data_key);
if (obj->next)
obj->next->prev = obj;
- set_objfile_data (symtab->objfile, stpy_objfile_data_key, obj);
+ set_objfile_data (SYMTAB_OBJFILE (symtab), stpy_objfile_data_key, obj);
}
else
obj->next = NULL;