This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PATCH 07/21] struct symtab split part 2: blockframe.c dwarf2-frame.c frame.c stack.c
- From: Doug Evans <xdje42 at gmail dot com>
- To: gdb-patches at sourceware dot org
- Date: Thu, 13 Nov 2014 04:54:12 -0800
- Subject: [PATCH 07/21] struct symtab split part 2: blockframe.c dwarf2-frame.c frame.c stack.c
- Authentication-results: sourceware.org; auth=none
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>
diff --git a/gdb/blockframe.c b/gdb/blockframe.c
index 5de116e..270ce0e 100644
--- a/gdb/blockframe.c
+++ b/gdb/blockframe.c
@@ -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. */
diff --git a/gdb/dwarf2-frame.c b/gdb/dwarf2-frame.c
index 80e5903..586f134 100644
--- a/gdb/dwarf2-frame.c
+++ b/gdb/dwarf2-frame.c
@@ -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;
diff --git a/gdb/frame.c b/gdb/frame.c
index 5c4217c..0663af9 100644
--- a/gdb/frame.c
+++ b/gdb/frame.c
@@ -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));
}
}
}
diff --git a/gdb/stack.c b/gdb/stack.c
index 35f491d..2834801 100644
--- a/gdb/stack.c
+++ b/gdb/stack.c
@@ -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);
}
}