mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-01 20:12:01 +08:00
SYMTAB_OBJFILE: New macro.
gdb/ChangeLog: * symtab.h (SYMTAB_OBJFILE): New macro. All uses of member symtab.objfile updated to use it.
This commit is contained in:
@ -1,3 +1,8 @@
|
|||||||
|
2014-11-18 Doug Evans <xdje42@gmail.com>
|
||||||
|
|
||||||
|
* symtab.h (SYMTAB_OBJFILE): New macro. All uses of member
|
||||||
|
symtab.objfile updated to use it.
|
||||||
|
|
||||||
2014-11-18 Doug Evans <xdje42@gmail.com>
|
2014-11-18 Doug Evans <xdje42@gmail.com>
|
||||||
|
|
||||||
* buildsym.c (watch_main_source_file_lossage): Fix memory leak.
|
* buildsym.c (watch_main_source_file_lossage): Fix memory leak.
|
||||||
|
@ -11524,8 +11524,8 @@ is_known_support_routine (struct frame_info *frame)
|
|||||||
re_comp (known_runtime_file_name_patterns[i]);
|
re_comp (known_runtime_file_name_patterns[i]);
|
||||||
if (re_exec (lbasename (sal.symtab->filename)))
|
if (re_exec (lbasename (sal.symtab->filename)))
|
||||||
return 1;
|
return 1;
|
||||||
if (sal.symtab->objfile != NULL
|
if (SYMTAB_OBJFILE (sal.symtab) != NULL
|
||||||
&& re_exec (objfile_name (sal.symtab->objfile)))
|
&& re_exec (objfile_name (SYMTAB_OBJFILE (sal.symtab))))
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -7314,7 +7314,7 @@ get_sal_arch (struct symtab_and_line sal)
|
|||||||
if (sal.section)
|
if (sal.section)
|
||||||
return get_objfile_arch (sal.section->objfile);
|
return get_objfile_arch (sal.section->objfile);
|
||||||
if (sal.symtab)
|
if (sal.symtab)
|
||||||
return get_objfile_arch (sal.symtab->objfile);
|
return get_objfile_arch (SYMTAB_OBJFILE (sal.symtab));
|
||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@ -10210,8 +10210,9 @@ resolve_sal_pc (struct symtab_and_line *sal)
|
|||||||
sym = block_linkage_function (b);
|
sym = block_linkage_function (b);
|
||||||
if (sym != NULL)
|
if (sym != NULL)
|
||||||
{
|
{
|
||||||
fixup_symbol_section (sym, sal->symtab->objfile);
|
fixup_symbol_section (sym, SYMTAB_OBJFILE (sal->symtab));
|
||||||
sal->section = SYMBOL_OBJ_SECTION (sal->symtab->objfile, sym);
|
sal->section = SYMBOL_OBJ_SECTION (SYMTAB_OBJFILE (sal->symtab),
|
||||||
|
sym);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -16050,7 +16051,7 @@ breakpoint_free_objfile (struct objfile *objfile)
|
|||||||
struct bp_location **locp, *loc;
|
struct bp_location **locp, *loc;
|
||||||
|
|
||||||
ALL_BP_LOCATIONS (loc, locp)
|
ALL_BP_LOCATIONS (loc, locp)
|
||||||
if (loc->symtab != NULL && loc->symtab->objfile == objfile)
|
if (loc->symtab != NULL && SYMTAB_OBJFILE (loc->symtab) == objfile)
|
||||||
loc->symtab = NULL;
|
loc->symtab = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -818,7 +818,7 @@ edit_command (char *arg, int from_tty)
|
|||||||
error (_("No source file for address %s."),
|
error (_("No source file for address %s."),
|
||||||
paddress (get_current_arch (), sal.pc));
|
paddress (get_current_arch (), sal.pc));
|
||||||
|
|
||||||
gdbarch = get_objfile_arch (sal.symtab->objfile);
|
gdbarch = get_objfile_arch (SYMTAB_OBJFILE (sal.symtab));
|
||||||
sym = find_pc_function (sal.pc);
|
sym = find_pc_function (sal.pc);
|
||||||
if (sym)
|
if (sym)
|
||||||
printf_filtered ("%s is in %s (%s:%d).\n",
|
printf_filtered ("%s is in %s (%s:%d).\n",
|
||||||
@ -1003,7 +1003,7 @@ list_command (char *arg, int from_tty)
|
|||||||
error (_("No source file for address %s."),
|
error (_("No source file for address %s."),
|
||||||
paddress (get_current_arch (), sal.pc));
|
paddress (get_current_arch (), sal.pc));
|
||||||
|
|
||||||
gdbarch = get_objfile_arch (sal.symtab->objfile);
|
gdbarch = get_objfile_arch (SYMTAB_OBJFILE (sal.symtab));
|
||||||
sym = find_pc_function (sal.pc);
|
sym = find_pc_function (sal.pc);
|
||||||
if (sym)
|
if (sym)
|
||||||
printf_filtered ("%s is in %s (%s:%d).\n",
|
printf_filtered ("%s is in %s (%s:%d).\n",
|
||||||
|
@ -686,19 +686,19 @@ gdbscm_lookup_block (SCM pc_scm)
|
|||||||
section = find_pc_mapped_section (pc);
|
section = find_pc_mapped_section (pc);
|
||||||
symtab = find_pc_sect_symtab (pc, section);
|
symtab = find_pc_sect_symtab (pc, section);
|
||||||
|
|
||||||
if (symtab != NULL && symtab->objfile != NULL)
|
if (symtab != NULL && SYMTAB_OBJFILE (symtab) != NULL)
|
||||||
block = block_for_pc (pc);
|
block = block_for_pc (pc);
|
||||||
}
|
}
|
||||||
GDBSCM_HANDLE_GDB_EXCEPTION (except);
|
GDBSCM_HANDLE_GDB_EXCEPTION (except);
|
||||||
|
|
||||||
if (symtab == NULL || symtab->objfile == NULL)
|
if (symtab == NULL || SYMTAB_OBJFILE (symtab) == NULL)
|
||||||
{
|
{
|
||||||
gdbscm_out_of_range_error (FUNC_NAME, SCM_ARG1, pc_scm,
|
gdbscm_out_of_range_error (FUNC_NAME, SCM_ARG1, pc_scm,
|
||||||
_("cannot locate object file for block"));
|
_("cannot locate object file for block"));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (block != NULL)
|
if (block != NULL)
|
||||||
return bkscm_scm_from_block (block, symtab->objfile);
|
return bkscm_scm_from_block (block, SYMTAB_OBJFILE (symtab));
|
||||||
return SCM_BOOL_F;
|
return SCM_BOOL_F;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -612,7 +612,7 @@ gdbscm_frame_block (SCM self)
|
|||||||
SCM block_scm;
|
SCM block_scm;
|
||||||
|
|
||||||
st = SYMBOL_SYMTAB (BLOCK_FUNCTION (fn_block));
|
st = SYMBOL_SYMTAB (BLOCK_FUNCTION (fn_block));
|
||||||
return bkscm_scm_from_block (block, st->objfile);
|
return bkscm_scm_from_block (block, SYMTAB_OBJFILE (st));
|
||||||
}
|
}
|
||||||
|
|
||||||
return SCM_BOOL_F;
|
return SCM_BOOL_F;
|
||||||
|
@ -109,7 +109,7 @@ stscm_eq_symtab_smob (const void *ap, const void *bp)
|
|||||||
static htab_t
|
static htab_t
|
||||||
stscm_objfile_symtab_map (struct symtab *symtab)
|
stscm_objfile_symtab_map (struct symtab *symtab)
|
||||||
{
|
{
|
||||||
struct objfile *objfile = symtab->objfile;
|
struct objfile *objfile = SYMTAB_OBJFILE (symtab);
|
||||||
htab_t htab = objfile_data (objfile, stscm_objfile_data_key);
|
htab_t htab = objfile_data (objfile, stscm_objfile_data_key);
|
||||||
|
|
||||||
if (htab == NULL)
|
if (htab == NULL)
|
||||||
@ -348,7 +348,7 @@ gdbscm_symtab_objfile (SCM self)
|
|||||||
= stscm_get_valid_symtab_smob_arg_unsafe (self, SCM_ARG1, FUNC_NAME);
|
= stscm_get_valid_symtab_smob_arg_unsafe (self, SCM_ARG1, FUNC_NAME);
|
||||||
const struct symtab *symtab = st_smob->symtab;
|
const struct symtab *symtab = st_smob->symtab;
|
||||||
|
|
||||||
return ofscm_scm_from_objfile (symtab->objfile);
|
return ofscm_scm_from_objfile (SYMTAB_OBJFILE (symtab));
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (symtab-global-block <gdb:symtab>) -> <gdb:block>
|
/* (symtab-global-block <gdb:symtab>) -> <gdb:block>
|
||||||
@ -366,7 +366,7 @@ gdbscm_symtab_global_block (SCM self)
|
|||||||
blockvector = BLOCKVECTOR (symtab);
|
blockvector = BLOCKVECTOR (symtab);
|
||||||
block = BLOCKVECTOR_BLOCK (blockvector, GLOBAL_BLOCK);
|
block = BLOCKVECTOR_BLOCK (blockvector, GLOBAL_BLOCK);
|
||||||
|
|
||||||
return bkscm_scm_from_block (block, symtab->objfile);
|
return bkscm_scm_from_block (block, SYMTAB_OBJFILE (symtab));
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (symtab-static-block <gdb:symtab>) -> <gdb:block>
|
/* (symtab-static-block <gdb:symtab>) -> <gdb:block>
|
||||||
@ -384,7 +384,7 @@ gdbscm_symtab_static_block (SCM self)
|
|||||||
blockvector = BLOCKVECTOR (symtab);
|
blockvector = BLOCKVECTOR (symtab);
|
||||||
block = BLOCKVECTOR_BLOCK (blockvector, STATIC_BLOCK);
|
block = BLOCKVECTOR_BLOCK (blockvector, STATIC_BLOCK);
|
||||||
|
|
||||||
return bkscm_scm_from_block (block, symtab->objfile);
|
return bkscm_scm_from_block (block, SYMTAB_OBJFILE (symtab));
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Administrivia for sal (symtab-and-line) smobs. */
|
/* Administrivia for sal (symtab-and-line) smobs. */
|
||||||
|
@ -49,7 +49,7 @@ mi_cmd_symbol_list_lines (char *command, char **argv, int argc)
|
|||||||
already sorted by increasing values in the symbol table, so no
|
already sorted by increasing values in the symbol table, so no
|
||||||
need to perform any other sorting. */
|
need to perform any other sorting. */
|
||||||
|
|
||||||
gdbarch = get_objfile_arch (s->objfile);
|
gdbarch = get_objfile_arch (SYMTAB_OBJFILE (s));
|
||||||
cleanup_stack = make_cleanup_ui_out_list_begin_end (uiout, "lines");
|
cleanup_stack = make_cleanup_ui_out_list_begin_end (uiout, "lines");
|
||||||
|
|
||||||
if (LINETABLE (s) != NULL && LINETABLE (s)->nitems > 0)
|
if (LINETABLE (s) != NULL && LINETABLE (s)->nitems > 0)
|
||||||
|
@ -641,7 +641,7 @@ free_objfile (struct objfile *objfile)
|
|||||||
{
|
{
|
||||||
struct symtab_and_line cursal = get_current_source_symtab_and_line ();
|
struct symtab_and_line cursal = get_current_source_symtab_and_line ();
|
||||||
|
|
||||||
if (cursal.symtab && cursal.symtab->objfile == objfile)
|
if (cursal.symtab && SYMTAB_OBJFILE (cursal.symtab) == objfile)
|
||||||
clear_current_source_symtab_and_line ();
|
clear_current_source_symtab_and_line ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -384,12 +384,12 @@ gdbpy_block_for_pc (PyObject *self, PyObject *args)
|
|||||||
section = find_pc_mapped_section (pc);
|
section = find_pc_mapped_section (pc);
|
||||||
symtab = find_pc_sect_symtab (pc, section);
|
symtab = find_pc_sect_symtab (pc, section);
|
||||||
|
|
||||||
if (symtab != NULL && symtab->objfile != NULL)
|
if (symtab != NULL && SYMTAB_OBJFILE (symtab) != NULL)
|
||||||
block = block_for_pc (pc);
|
block = block_for_pc (pc);
|
||||||
}
|
}
|
||||||
GDB_PY_HANDLE_EXCEPTION (except);
|
GDB_PY_HANDLE_EXCEPTION (except);
|
||||||
|
|
||||||
if (!symtab || symtab->objfile == NULL)
|
if (!symtab || SYMTAB_OBJFILE (symtab) == NULL)
|
||||||
{
|
{
|
||||||
PyErr_SetString (PyExc_RuntimeError,
|
PyErr_SetString (PyExc_RuntimeError,
|
||||||
_("Cannot locate object file for block."));
|
_("Cannot locate object file for block."));
|
||||||
@ -397,7 +397,7 @@ gdbpy_block_for_pc (PyObject *self, PyObject *args)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (block)
|
if (block)
|
||||||
return block_to_block_object (block, symtab->objfile);
|
return block_to_block_object (block, SYMTAB_OBJFILE (symtab));
|
||||||
|
|
||||||
Py_RETURN_NONE;
|
Py_RETURN_NONE;
|
||||||
}
|
}
|
||||||
|
@ -303,7 +303,7 @@ frapy_block (PyObject *self, PyObject *args)
|
|||||||
struct symtab *symt;
|
struct symtab *symt;
|
||||||
|
|
||||||
symt = SYMBOL_SYMTAB (BLOCK_FUNCTION (fn_block));
|
symt = SYMBOL_SYMTAB (BLOCK_FUNCTION (fn_block));
|
||||||
return block_to_block_object (block, symt->objfile);
|
return block_to_block_object (block, SYMTAB_OBJFILE (symt));
|
||||||
}
|
}
|
||||||
|
|
||||||
Py_RETURN_NONE;
|
Py_RETURN_NONE;
|
||||||
|
@ -121,7 +121,7 @@ stpy_get_objfile (PyObject *self, void *closure)
|
|||||||
|
|
||||||
STPY_REQUIRE_VALID (self, symtab);
|
STPY_REQUIRE_VALID (self, symtab);
|
||||||
|
|
||||||
result = objfile_to_objfile_object (symtab->objfile);
|
result = objfile_to_objfile_object (SYMTAB_OBJFILE (symtab));
|
||||||
Py_XINCREF (result);
|
Py_XINCREF (result);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -186,7 +186,7 @@ stpy_global_block (PyObject *self, PyObject *args)
|
|||||||
|
|
||||||
blockvector = BLOCKVECTOR (symtab);
|
blockvector = BLOCKVECTOR (symtab);
|
||||||
block = BLOCKVECTOR_BLOCK (blockvector, GLOBAL_BLOCK);
|
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. */
|
/* Return the STATIC_BLOCK of the underlying symtab. */
|
||||||
@ -202,7 +202,7 @@ stpy_static_block (PyObject *self, PyObject *args)
|
|||||||
|
|
||||||
blockvector = BLOCKVECTOR (symtab);
|
blockvector = BLOCKVECTOR (symtab);
|
||||||
block = BLOCKVECTOR_BLOCK (blockvector, STATIC_BLOCK);
|
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.
|
/* Implementation of gdb.Symtab.linetable (self) -> gdb.Linetable.
|
||||||
@ -252,7 +252,7 @@ stpy_dealloc (PyObject *obj)
|
|||||||
symtab->prev->next = symtab->next;
|
symtab->prev->next = symtab->next;
|
||||||
else if (symtab->symtab)
|
else if (symtab->symtab)
|
||||||
{
|
{
|
||||||
set_objfile_data (symtab->symtab->objfile,
|
set_objfile_data (SYMTAB_OBJFILE (symtab->symtab),
|
||||||
stpy_objfile_data_key, symtab->next);
|
stpy_objfile_data_key, symtab->next);
|
||||||
}
|
}
|
||||||
if (symtab->next)
|
if (symtab->next)
|
||||||
@ -333,7 +333,7 @@ salpy_dealloc (PyObject *self)
|
|||||||
if (self_sal->prev)
|
if (self_sal->prev)
|
||||||
self_sal->prev->next = self_sal->next;
|
self_sal->prev->next = self_sal->next;
|
||||||
else if (self_sal->symtab != (symtab_object * ) Py_None)
|
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);
|
salpy_objfile_data_key, self_sal->next);
|
||||||
|
|
||||||
if (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. */
|
objfile cleanup observer linked list. */
|
||||||
if (sal_obj->symtab != (symtab_object *)Py_None)
|
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);
|
salpy_objfile_data_key);
|
||||||
if (sal_obj->next)
|
if (sal_obj->next)
|
||||||
sal_obj->next->prev = sal_obj;
|
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);
|
salpy_objfile_data_key, sal_obj);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -403,10 +403,11 @@ set_symtab (symtab_object *obj, struct symtab *symtab)
|
|||||||
obj->prev = NULL;
|
obj->prev = NULL;
|
||||||
if (symtab)
|
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)
|
if (obj->next)
|
||||||
obj->next->prev = obj;
|
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
|
else
|
||||||
obj->next = NULL;
|
obj->next = NULL;
|
||||||
|
@ -1189,8 +1189,8 @@ find_source_lines (struct symtab *s, int desc)
|
|||||||
if (fstat (desc, &st) < 0)
|
if (fstat (desc, &st) < 0)
|
||||||
perror_with_name (symtab_to_filename_for_display (s));
|
perror_with_name (symtab_to_filename_for_display (s));
|
||||||
|
|
||||||
if (s->objfile && s->objfile->obfd)
|
if (SYMTAB_OBJFILE (s) != NULL && SYMTAB_OBJFILE (s)->obfd != NULL)
|
||||||
mtime = s->objfile->mtime;
|
mtime = SYMTAB_OBJFILE (s)->mtime;
|
||||||
else if (exec_bfd)
|
else if (exec_bfd)
|
||||||
mtime = exec_bfd_mtime;
|
mtime = exec_bfd_mtime;
|
||||||
|
|
||||||
@ -1294,7 +1294,7 @@ identify_source_line (struct symtab *s, int line, int mid_statement,
|
|||||||
/* Don't index off the end of the line_charpos array. */
|
/* Don't index off the end of the line_charpos array. */
|
||||||
return 0;
|
return 0;
|
||||||
annotate_source (s->fullname, line, s->line_charpos[line - 1],
|
annotate_source (s->fullname, line, s->line_charpos[line - 1],
|
||||||
mid_statement, get_objfile_arch (s->objfile), pc);
|
mid_statement, get_objfile_arch (SYMTAB_OBJFILE (s)), pc);
|
||||||
|
|
||||||
current_source_line = line;
|
current_source_line = line;
|
||||||
current_source_symtab = s;
|
current_source_symtab = s;
|
||||||
@ -1538,7 +1538,8 @@ line_info (char *arg, int from_tty)
|
|||||||
else if (sal.line > 0
|
else if (sal.line > 0
|
||||||
&& find_line_pc_range (sal, &start_pc, &end_pc))
|
&& find_line_pc_range (sal, &start_pc, &end_pc))
|
||||||
{
|
{
|
||||||
struct gdbarch *gdbarch = get_objfile_arch (sal.symtab->objfile);
|
struct gdbarch *gdbarch
|
||||||
|
= get_objfile_arch (SYMTAB_OBJFILE (sal.symtab));
|
||||||
|
|
||||||
if (start_pc == end_pc)
|
if (start_pc == end_pc)
|
||||||
{
|
{
|
||||||
|
@ -2947,7 +2947,7 @@ allocate_symtab (const char *filename, struct objfile *objfile)
|
|||||||
|
|
||||||
/* Hook it to the objfile it comes from. */
|
/* Hook it to the objfile it comes from. */
|
||||||
|
|
||||||
symtab->objfile = objfile;
|
SYMTAB_OBJFILE (symtab) = objfile;
|
||||||
symtab->next = objfile->symtabs;
|
symtab->next = objfile->symtabs;
|
||||||
objfile->symtabs = symtab;
|
objfile->symtabs = symtab;
|
||||||
|
|
||||||
|
@ -182,7 +182,7 @@ dump_objfile (struct objfile *objfile)
|
|||||||
printf_filtered ("%s at ", symtab_to_filename_for_display (symtab));
|
printf_filtered ("%s at ", symtab_to_filename_for_display (symtab));
|
||||||
gdb_print_host_address (symtab, gdb_stdout);
|
gdb_print_host_address (symtab, gdb_stdout);
|
||||||
printf_filtered (", ");
|
printf_filtered (", ");
|
||||||
if (symtab->objfile != objfile)
|
if (SYMTAB_OBJFILE (symtab) != objfile)
|
||||||
{
|
{
|
||||||
printf_filtered ("NOT ON CHAIN! ");
|
printf_filtered ("NOT ON CHAIN! ");
|
||||||
}
|
}
|
||||||
|
@ -2317,7 +2317,7 @@ find_pc_sect_line (CORE_ADDR pc, struct obj_section *section, int notcurrent)
|
|||||||
}
|
}
|
||||||
|
|
||||||
bv = BLOCKVECTOR (s);
|
bv = BLOCKVECTOR (s);
|
||||||
objfile = s->objfile;
|
objfile = SYMTAB_OBJFILE (s);
|
||||||
|
|
||||||
/* Look at all the symtabs that share this blockvector.
|
/* Look at all the symtabs that share this blockvector.
|
||||||
They all have the same apriori range, that we found was right;
|
They all have the same apriori range, that we found was right;
|
||||||
|
@ -774,7 +774,7 @@ extern const struct symbol_impl *symbol_impls;
|
|||||||
#define SYMBOL_BLOCK_OPS(symbol) (SYMBOL_IMPL (symbol).ops_block)
|
#define SYMBOL_BLOCK_OPS(symbol) (SYMBOL_IMPL (symbol).ops_block)
|
||||||
#define SYMBOL_REGISTER_OPS(symbol) (SYMBOL_IMPL (symbol).ops_register)
|
#define SYMBOL_REGISTER_OPS(symbol) (SYMBOL_IMPL (symbol).ops_register)
|
||||||
#define SYMBOL_LOCATION_BATON(symbol) (symbol)->aux_value
|
#define SYMBOL_LOCATION_BATON(symbol) (symbol)->aux_value
|
||||||
#define SYMBOL_OBJFILE(symbol) (SYMBOL_SYMTAB (symbol)->objfile)
|
#define SYMBOL_OBJFILE(symbol) SYMTAB_OBJFILE (SYMBOL_SYMTAB (symbol))
|
||||||
|
|
||||||
extern int register_symbol_computed_impl (enum address_class,
|
extern int register_symbol_computed_impl (enum address_class,
|
||||||
const struct symbol_computed_ops *);
|
const struct symbol_computed_ops *);
|
||||||
@ -982,7 +982,8 @@ struct symtab
|
|||||||
|
|
||||||
#define BLOCKVECTOR(symtab) (symtab)->blockvector
|
#define BLOCKVECTOR(symtab) (symtab)->blockvector
|
||||||
#define LINETABLE(symtab) (symtab)->linetable
|
#define LINETABLE(symtab) (symtab)->linetable
|
||||||
#define SYMTAB_PSPACE(symtab) (symtab)->objfile->pspace
|
#define SYMTAB_OBJFILE(symtab) ((symtab)->objfile)
|
||||||
|
#define SYMTAB_PSPACE(symtab) (SYMTAB_OBJFILE (symtab)->pspace)
|
||||||
|
|
||||||
/* Call this to set the "primary" field in struct symtab. */
|
/* Call this to set the "primary" field in struct symtab. */
|
||||||
extern void set_symtab_primary (struct symtab *, int primary);
|
extern void set_symtab_primary (struct symtab *, int primary);
|
||||||
|
@ -111,7 +111,7 @@ tui_set_source_content (struct symtab *s,
|
|||||||
stream = fdopen (desc, FOPEN_RT);
|
stream = fdopen (desc, FOPEN_RT);
|
||||||
clearerr (stream);
|
clearerr (stream);
|
||||||
cur_line = 0;
|
cur_line = 0;
|
||||||
src->gdbarch = get_objfile_arch (s->objfile);
|
src->gdbarch = get_objfile_arch (SYMTAB_OBJFILE (s));
|
||||||
src->start_line_or_addr.loa = LOA_LINE;
|
src->start_line_or_addr.loa = LOA_LINE;
|
||||||
cur_line_no = src->start_line_or_addr.u.line_no = line_no;
|
cur_line_no = src->start_line_or_addr.u.line_no = line_no;
|
||||||
if (offset > 0)
|
if (offset > 0)
|
||||||
|
@ -115,7 +115,7 @@ tui_update_source_window_as_is (struct tui_win_info *win_info,
|
|||||||
sal.line = line_or_addr.u.line_no +
|
sal.line = line_or_addr.u.line_no +
|
||||||
(win_info->generic.content_size - 2);
|
(win_info->generic.content_size - 2);
|
||||||
sal.symtab = s;
|
sal.symtab = s;
|
||||||
sal.pspace = s->objfile->pspace;
|
sal.pspace = SYMTAB_PSPACE (s);
|
||||||
set_current_source_symtab_and_line (&sal);
|
set_current_source_symtab_and_line (&sal);
|
||||||
/* If the focus was in the asm win, put it in the src win if
|
/* If the focus was in the asm win, put it in the src win if
|
||||||
we don't have a split layout. */
|
we don't have a split layout. */
|
||||||
@ -183,7 +183,7 @@ tui_update_source_windows_with_line (struct symtab *s, int line)
|
|||||||
if (!s)
|
if (!s)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
gdbarch = get_objfile_arch (s->objfile);
|
gdbarch = get_objfile_arch (SYMTAB_OBJFILE (s));
|
||||||
|
|
||||||
switch (tui_current_layout ())
|
switch (tui_current_layout ())
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user