aboutsummaryrefslogtreecommitdiff
path: root/gdb/psymtab.c
diff options
context:
space:
mode:
authorJan Kratochvil <jan.kratochvil@redhat.com>2011-12-02 01:28:55 +0000
committerJan Kratochvil <jan.kratochvil@redhat.com>2011-12-02 01:28:55 +0000
commit9750bca92c8e67e36ac1b9724abfcb814efaf48f (patch)
tree6161738a1dcf9feccf4570fc2e413cf6d40ab797 /gdb/psymtab.c
parentf28c316a0bbb40b341e36d9e328a4d60121c395a (diff)
downloadgdb-9750bca92c8e67e36ac1b9724abfcb814efaf48f.zip
gdb-9750bca92c8e67e36ac1b9724abfcb814efaf48f.tar.gz
gdb-9750bca92c8e67e36ac1b9724abfcb814efaf48f.tar.bz2
gdb/
PR breakpoints/13346 * dwarf2read.c (process_psymtab_comp_unit): Set PSYMTABS_ADDRMAP_SUPPORTED. * psympriv.h (struct partial_symtab): Comment textlow and texthigh validity. New field psymtabs_addrmap_supported. * psymtab.c (find_pc_sect_psymtab_closer): New gdb_assert on psymtabs_addrmap_supported. (find_pc_sect_psymtab): Do not fallback to TEXTLOW and TEXTHIGH for !PSYMTABS_ADDRMAP_SUPPORTED. (dump_psymtab, maintenance_info_psymtabs): Print also psymtabs_addrmap_supported. gdb/testsuite/ PR breakpoints/13346 * gdb.dwarf2/dw2-objfile-overlap-inner.S: New file. * gdb.dwarf2/dw2-objfile-overlap-outer.S: New file. * gdb.dwarf2/dw2-objfile-overlap.exp: New file.
Diffstat (limited to 'gdb/psymtab.c')
-rw-r--r--gdb/psymtab.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/gdb/psymtab.c b/gdb/psymtab.c
index 6c4507d..8178c01 100644
--- a/gdb/psymtab.c
+++ b/gdb/psymtab.c
@@ -221,6 +221,8 @@ find_pc_sect_psymtab_closer (CORE_ADDR pc, struct obj_section *section,
struct partial_symtab *best_pst = pst;
CORE_ADDR best_addr = pst->textlow;
+ gdb_assert (!pst->psymtabs_addrmap_supported);
+
/* An objfile that has its functions reordered might have
many partial symbol tables containing the PC, but
we want the partial symbol table that contains the
@@ -344,7 +346,8 @@ find_pc_sect_psymtab (struct objfile *objfile, CORE_ADDR pc,
debug info type in single OBJFILE. */
ALL_OBJFILE_PSYMTABS_REQUIRED (objfile, pst)
- if (pc >= pst->textlow && pc < pst->texthigh)
+ if (!pst->psymtabs_addrmap_supported
+ && pc >= pst->textlow && pc < pst->texthigh)
{
struct partial_symtab *best_pst;
@@ -976,6 +979,8 @@ dump_psymtab (struct objfile *objfile, struct partial_symtab *psymtab,
fprintf_filtered (outfile, "-");
fputs_filtered (paddress (gdbarch, psymtab->texthigh), outfile);
fprintf_filtered (outfile, "\n");
+ fprintf_filtered (outfile, " Address map supported - %s.\n",
+ psymtab->psymtabs_addrmap_supported ? "yes" : "no");
fprintf_filtered (outfile, " Depends on %d other partial symtabs.\n",
psymtab->number_of_dependencies);
for (i = 0; i < psymtab->number_of_dependencies; i++)
@@ -1781,6 +1786,9 @@ maintenance_info_psymtabs (char *regexp, int from_tty)
fputs_filtered (paddress (gdbarch, psymtab->texthigh),
gdb_stdout);
printf_filtered ("\n");
+ printf_filtered (" psymtabs_addrmap_supported %s\n",
+ (psymtab->psymtabs_addrmap_supported
+ ? "yes" : "no"));
printf_filtered (" globals ");
if (psymtab->n_global_syms)
{