[07/21] struct symtab split part 2: blockframe.c dwarf2-frame.c frame.c stack.c
Commit Message
This file contains the changes to blockframe.c, dwarf2-frame.c,
frame.c, and stack.c
Full ChangeLog: https://sourceware.org/ml/gdb-patches/2014-11/msg00233.html
2014-11-12 Doug Evans <xdje42@gmail.com>
@@ -195,7 +195,7 @@ find_pc_partial_function_gnu_ifunc (CORE_ADDR pc, const char **name,
struct obj_section *section;
struct symbol *f;
struct bound_minimal_symbol msymbol;
- struct symtab *symtab = NULL;
+ struct compunit_symtab *compunit_symtab = NULL;
struct objfile *objfile;
int i;
CORE_ADDR mapped_pc;
@@ -220,13 +220,17 @@ find_pc_partial_function_gnu_ifunc (CORE_ADDR pc, const char **name,
ALL_OBJFILES (objfile)
{
if (objfile->sf)
- symtab = objfile->sf->qf->find_pc_sect_symtab (objfile, msymbol,
- mapped_pc, section, 0);
- if (symtab)
+ {
+ compunit_symtab
+ = objfile->sf->qf->find_pc_sect_compunit_symtab (objfile, msymbol,
+ mapped_pc, section,
+ 0);
+ }
+ if (compunit_symtab != NULL)
break;
}
- if (symtab)
+ if (compunit_symtab != NULL)
{
/* Checking whether the msymbol has a larger value is for the
"pathological" case mentioned in print_frame_info. */
@@ -852,13 +852,13 @@ static void
dwarf2_frame_find_quirks (struct dwarf2_frame_state *fs,
struct dwarf2_fde *fde)
{
- struct symtab *s;
+ struct compunit_symtab *cust;
- s = find_pc_symtab (fs->pc);
- if (s == NULL)
+ cust = find_pc_compunit_symtab (fs->pc);
+ if (cust == NULL)
return;
- if (producer_is_realview (s->producer))
+ if (producer_is_realview (COMPUNIT_PRODUCER (cust)))
{
if (fde->cie->version == 1)
fs->armcc_cfa_offsets_sf = 1;
@@ -1600,13 +1600,13 @@ select_frame (struct frame_info *fi)
block. */
if (get_frame_address_in_block_if_available (fi, &pc))
{
- struct symtab *s = find_pc_symtab (pc);
+ struct compunit_symtab *cust = find_pc_compunit_symtab (pc);
- if (s
- && s->language != current_language->la_language
- && s->language != language_unknown
+ if (cust != NULL
+ && compunit_language (cust) != current_language->la_language
+ && compunit_language (cust) != language_unknown
&& language_mode == language_mode_auto)
- set_language (s->language);
+ set_language (compunit_language (cust));
}
}
}
@@ -2569,7 +2569,6 @@ get_frame_language (void)
{
volatile struct gdb_exception ex;
CORE_ADDR pc = 0;
- struct symtab *s;
/* We determine the current frame language by looking up its
associated symtab. To retrieve this symtab, we use the frame
@@ -2591,9 +2590,10 @@ get_frame_language (void)
}
else
{
- s = find_pc_symtab (pc);
- if (s != NULL)
- return s->language;
+ struct compunit_symtab *cust = find_pc_compunit_symtab (pc);
+
+ if (cust != NULL)
+ return compunit_language (cust);
}
}