* dwarf2read.c (dwarf2_build_psymtabs_hard): Handle the case

where a compilation unit die has no children (DW_TAG_compile_unit
	has DW_children_no).
	(scan_partial_symbols): Add comment for nesting_level.
This commit is contained in:
Dawn Perchik 1997-11-01 01:28:26 +00:00
parent aa9aa96fac
commit 6850646060
2 changed files with 21 additions and 4 deletions

View File

@ -1,3 +1,10 @@
Fri Oct 24 17:24:00 1997 Dawn Perchik <dawn@cygnus.com>
* dwarf2read.c (dwarf2_build_psymtabs_hard): Handle the case
where a compilation unit die has no children (DW_TAG_compile_unit
has DW_children_no).
(scan_partial_symbols): Add comment for nesting_level.
start-sanitize-tx49
Wed Oct 29 17:45:43 1997 Gavin Koch <gavin@cygnus.com>

View File

@ -964,8 +964,11 @@ dwarf2_build_psymtabs_hard (objfile, section_offsets, mainline)
/* Store the function that reads in the rest of the symbol table */
pst->read_symtab = dwarf2_psymtab_to_symtab;
/* Read the rest of the partial symbols from this comp unit */
info_ptr = scan_partial_symbols (info_ptr, objfile, &lowpc, &highpc);
/* Check if comp unit has_children.
If so, read the rest of the partial symbols from this comp unit.
If not, there's no more debug_info for this comp unit. */
if (comp_unit_die.has_children)
info_ptr = scan_partial_symbols (info_ptr, objfile, &lowpc, &highpc);
/* If the compilation unit didn't have an explicit address range,
then use the information extracted from its child dies. */
@ -1004,9 +1007,16 @@ scan_partial_symbols (info_ptr, objfile, lowpc, highpc)
{
bfd *abfd = objfile->obfd;
struct partial_die_info pdi;
int nesting_level = 1; /* we've already read in comp_unit_die */
int has_pc_info;
/* This function is called after we've read in the comp_unit_die in
order to read its children. We start the nesting level at 1 since
we have pushed 1 level down in order to read the comp unit's children.
The comp unit itself is at level 0, so we stop reading when we pop
back to that level. */
int nesting_level = 1;
int has_pc_info;
*lowpc = ((CORE_ADDR) -1);
*highpc = ((CORE_ADDR) 0);