mirror of
https://github.com/bminor/binutils-gdb.git
synced 2025-12-29 02:20:51 +00:00
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.
This commit is contained in:
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user