diff options
author | Jan Kratochvil <jan.kratochvil@redhat.com> | 2012-07-13 20:26:11 +0000 |
---|---|---|
committer | Jan Kratochvil <jan.kratochvil@redhat.com> | 2012-07-13 20:26:11 +0000 |
commit | 4359dff1c517dc398912c8d3be440b711881b6d6 (patch) | |
tree | 813b9515c5462684df9edc72b36f1f52dfc58286 /gdb/dwarf2read.c | |
parent | a24f71abb4b5c2785619a809d6dfbe0ba42ef769 (diff) | |
download | gdb-4359dff1c517dc398912c8d3be440b711881b6d6.zip gdb-4359dff1c517dc398912c8d3be440b711881b6d6.tar.gz gdb-4359dff1c517dc398912c8d3be440b711881b6d6.tar.bz2 |
gdb/
* buildsym.c (end_symtab_1): Split it to ...
(end_symtab_get_static_block): ... this ...
(end_symtab_from_static_block): ... and this function.
(end_symtab, end_expandable_symtab): Call them.
* buildsym.h (end_symtab_get_static_block)
(end_symtab_from_static_block): New declarations.
* dwarf2read.c (process_full_comp_unit): New variable static_block.
Set its valid CU ranges.
gdb/testsuite/
* gdb.dwarf2/dw2-minsym-in-cu.S: New file.
* gdb.dwarf2/dw2-minsym-in-cu.exp: New file.
Diffstat (limited to 'gdb/dwarf2read.c')
-rw-r--r-- | gdb/dwarf2read.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c index 9e3be9f..1d51db2 100644 --- a/gdb/dwarf2read.c +++ b/gdb/dwarf2read.c @@ -6593,6 +6593,7 @@ process_full_comp_unit (struct dwarf2_per_cu_data *per_cu, struct symtab *symtab; struct cleanup *back_to, *delayed_list_cleanup; CORE_ADDR baseaddr; + struct block *static_block; baseaddr = ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT (objfile)); @@ -6623,7 +6624,17 @@ process_full_comp_unit (struct dwarf2_per_cu_data *per_cu, it, by scanning the DIE's below the compilation unit. */ get_scope_pc_bounds (cu->dies, &lowpc, &highpc, cu); - symtab = end_symtab (highpc + baseaddr, objfile, SECT_OFF_TEXT (objfile)); + static_block = end_symtab_get_static_block (highpc + baseaddr, objfile, 0); + + /* If the comp unit has DW_AT_ranges, it may have discontiguous ranges. + Also, DW_AT_ranges may record ranges not belonging to any child DIEs + (such as virtual method tables). Record the ranges in STATIC_BLOCK's + addrmap to help ensure it has an accurate map of pc values belonging to + this comp unit. */ + dwarf2_record_block_ranges (cu->dies, static_block, baseaddr, cu); + + symtab = end_symtab_from_static_block (static_block, objfile, + SECT_OFF_TEXT (objfile), 0); if (symtab != NULL) { |