summaryrefslogtreecommitdiff
path: root/gdb/python/py-linetable.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/python/py-linetable.c')
-rw-r--r--gdb/python/py-linetable.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/gdb/python/py-linetable.c b/gdb/python/py-linetable.c
index dfd4cbebdae..8e545febb17 100644
--- a/gdb/python/py-linetable.c
+++ b/gdb/python/py-linetable.c
@@ -192,16 +192,16 @@ ltpy_has_line (PyObject *self, PyObject *args)
if (! PyArg_ParseTuple (args, GDB_PY_LL_ARG, &py_line))
return NULL;
- if (SYMTAB_LINETABLE (symtab) == NULL)
+ if (symtab->linetable () == NULL)
{
PyErr_SetString (PyExc_RuntimeError,
_("Linetable information not found in symbol table"));
return NULL;
}
- for (index = 0; index < SYMTAB_LINETABLE (symtab)->nitems; index++)
+ for (index = 0; index < symtab->linetable ()->nitems; index++)
{
- struct linetable_entry *item = &(SYMTAB_LINETABLE (symtab)->item[index]);
+ struct linetable_entry *item = &(symtab->linetable ()->item[index]);
if (item->line == py_line)
Py_RETURN_TRUE;
}
@@ -223,7 +223,7 @@ ltpy_get_all_source_lines (PyObject *self, PyObject *args)
LTPY_REQUIRE_VALID (self, symtab);
- if (SYMTAB_LINETABLE (symtab) == NULL)
+ if (symtab->linetable () == NULL)
{
PyErr_SetString (PyExc_RuntimeError,
_("Linetable information not found in symbol table"));
@@ -234,9 +234,9 @@ ltpy_get_all_source_lines (PyObject *self, PyObject *args)
if (source_dict == NULL)
return NULL;
- for (index = 0; index < SYMTAB_LINETABLE (symtab)->nitems; index++)
+ for (index = 0; index < symtab->linetable ()->nitems; index++)
{
- item = &(SYMTAB_LINETABLE (symtab)->item[index]);
+ item = &(symtab->linetable ()->item[index]);
/* 0 is used to signify end of line table information. Do not
include in the source set. */
@@ -399,13 +399,13 @@ ltpy_iternext (PyObject *self)
LTPY_REQUIRE_VALID (iter_obj->source, symtab);
- if (iter_obj->current_index >= SYMTAB_LINETABLE (symtab)->nitems)
+ if (iter_obj->current_index >= symtab->linetable ()->nitems)
{
PyErr_SetNone (PyExc_StopIteration);
return NULL;
}
- item = &(SYMTAB_LINETABLE (symtab)->item[iter_obj->current_index]);
+ item = &(symtab->linetable ()->item[iter_obj->current_index]);
/* Skip over internal entries such as 0. 0 signifies the end of
line table data and is not useful to the API user. */
@@ -414,12 +414,12 @@ ltpy_iternext (PyObject *self)
iter_obj->current_index++;
/* Exit if the internal value is the last item in the line table. */
- if (iter_obj->current_index >= SYMTAB_LINETABLE (symtab)->nitems)
+ if (iter_obj->current_index >= symtab->linetable ()->nitems)
{
PyErr_SetNone (PyExc_StopIteration);
return NULL;
}
- item = &(SYMTAB_LINETABLE (symtab)->item[iter_obj->current_index]);
+ item = &(symtab->linetable ()->item[iter_obj->current_index]);
}
obj = build_linetable_entry (item->line, item->pc);