aboutsummaryrefslogtreecommitdiff
path: root/gdb/psymtab.c
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2013-04-08 20:18:11 +0000
committerTom Tromey <tromey@redhat.com>2013-04-08 20:18:11 +0000
commite27d198cc40537237b23d1f34f972d3b2e1c805e (patch)
tree814a2a2f860353484bac1491ffd361a1bc77d2db /gdb/psymtab.c
parente6dc44a8f5a3df8a1799ee1c8a0c7703988923ae (diff)
downloadgdb-e27d198cc40537237b23d1f34f972d3b2e1c805e.zip
gdb-e27d198cc40537237b23d1f34f972d3b2e1c805e.tar.gz
gdb-e27d198cc40537237b23d1f34f972d3b2e1c805e.tar.bz2
PR symtab/8424:
* blockframe.c (find_pc_partial_function_gnu_ifunc): Check SYMBOL_SECTION, not SYMBOL_OBJ_SECTION. * breakpoint.c (resolve_sal_pc): Update. * elfread.c (elf_gnu_ifunc_record_cache): Update. * findvar.c (struct minsym_lookup_data) <objfile>: New field. (minsym_lookup_iterator_cb): Use it. (default_read_var_value): Update. * hppa-hpux-tdep.c (hppa64_hpux_in_solib_call_trampoline): Update. * infcmd.c (jump_command): Update. * linespec.c (minsym_found): Update. * maint.c (maintenance_translate_address): Update. * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Update. (prim_record_minimal_symbol_full): Don't set SYMBOL_OBJ_SECTION. * parse.c (write_exp_msymbol): Update. * printcmd.c (address_info): Update. * psymtab.c (find_pc_sect_psymbol): Update. (fixup_psymbol_section): Check SYMBOL_SECTION, not SYMBOL_OBJ_SECTION. (add_psymbol_to_bcache): Correctly initialize SYMBOL_SECTION. Don't initialize SYMBOL_OBJ_SECTION. * spu-tdep.c (spu_catch_start): Update. * stabsread.c (define_symbol): Don't set SYMBOL_SECTION. * symmisc.c (dump_msymbols, print_symbol): Update. * symtab.c (fixup_section): Don't set 'obj_section'. Change how fallback section is computed. (fixup_symbol_section): Update. (find_pc_sect_symtab, find_function_start_sal, skip_prologue_sal): Update. (allocate_symbol, initialize_symbol, allocate_template_symbol): Initialize SYMBOL_SECTION. * symtab.h (struct general_symbol_info) <section>: Update comment. <obj_section>: Remove. (SYMBOL_OBJ_SECTION): Add 'objfile' argument. Rewrite. (SYMBOL_OBJFILE): New macro.
Diffstat (limited to 'gdb/psymtab.c')
-rw-r--r--gdb/psymtab.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/gdb/psymtab.c b/gdb/psymtab.c
index e36268d..b799a03 100644
--- a/gdb/psymtab.c
+++ b/gdb/psymtab.c
@@ -429,7 +429,8 @@ find_pc_sect_psymbol (struct objfile *objfile,
if (section) /* Match on a specific section. */
{
fixup_psymbol_section (p, objfile);
- if (!matching_obj_sections (SYMBOL_OBJ_SECTION (p), section))
+ if (!matching_obj_sections (SYMBOL_OBJ_SECTION (objfile, p),
+ section))
continue;
}
best_pc = SYMBOL_VALUE_ADDRESS (p);
@@ -453,7 +454,8 @@ find_pc_sect_psymbol (struct objfile *objfile,
if (section) /* Match on a specific section. */
{
fixup_psymbol_section (p, objfile);
- if (!matching_obj_sections (SYMBOL_OBJ_SECTION (p), section))
+ if (!matching_obj_sections (SYMBOL_OBJ_SECTION (objfile, p),
+ section))
continue;
}
best_pc = SYMBOL_VALUE_ADDRESS (p);
@@ -469,7 +471,10 @@ fixup_psymbol_section (struct partial_symbol *psym, struct objfile *objfile)
{
CORE_ADDR addr;
- if (psym == NULL || SYMBOL_OBJ_SECTION (psym) != NULL)
+ if (!psym)
+ return;
+
+ if (SYMBOL_SECTION (psym) >= 0)
return;
gdb_assert (objfile);
@@ -1603,8 +1608,7 @@ add_psymbol_to_bcache (const char *name, int namelength, int copy_name,
{
SYMBOL_VALUE_ADDRESS (&psymbol) = coreaddr;
}
- SYMBOL_SECTION (&psymbol) = 0;
- SYMBOL_OBJ_SECTION (&psymbol) = NULL;
+ SYMBOL_SECTION (&psymbol) = -1;
SYMBOL_SET_LANGUAGE (&psymbol, language, &objfile->objfile_obstack);
PSYMBOL_DOMAIN (&psymbol) = domain;
PSYMBOL_CLASS (&psymbol) = class;