* dwarf2read.c: Include "hashtab.h".
(struct dwarf2_cu): Add partial_dies, comp_unit_obstack, has_namespace_info. (struct partial_die_info): Add comments. Use bitfields to reduce memory footprint. Add scope, scope_set, has_specification, spec_offset, die_parent, die_child, and die_sibling. (peek_die_abbrev): Add prototype. (partial_read_comp_unit_head): New function, broken out from dwarf2_build_psymtabs_hard. (dwarf2_build_psymtabs_hard): Remove unused variable abbrev_ptr. Use partial_read_comp_unit_head. Initialize the CU and comp_unit_obstack. Update calls to read_partial_die and scan_partial_symbols. Use free_stack_comp_unit and load_partial_dies. (scan_partial_symbols): Change PDI to a pointer. Use the child and sibling pointers to walk partial DIEs. Call fixup_partial_die. Update calls to helper functions. Remove NAMESPACE argument. Update comments. (partial_die_parent_scope, partial_die_full_name): New functions. (add_partial_symbol): Remove namespace argument. Update call to pdi_needs_namespace. Use partial_die_full_name. Handle DW_TAG_namespace. Check has_namespace_info flag. (pdi_needs_namespace): Remove NAMESPACE argument. Just check the tag. Handle namespaces. (add_partial_namespace, add_partial_enumeration): Simplify. (guess_structure_name): New function, derived from add_partial_structure. (add_partial_structure): Remove. (determine_class_name): Update comment. (dwarf2_read_abbrevs): Set has_namespace_info flag. (is_type_tag_for_partial, load_partial_dies): New functions. (read_partial_die): Pass abbrev and abbrev_len as arguments. Record specifications instead of following them immediately. (find_partial_die_in_comp_unit, find_partial_die) (fixup_partial_die, free_stack_comp_unit) (hashtab_obstack_allocate, dummy_obstack_deallocate) (partial_die_hash, partial_die_eq): New functions. * Makefile.in (hashtab_h): Define. (dwarf2read.o): Update dependencies. (observer_inc, observer_h): Move to the correct section.
This commit is contained in:
parent
51860f0543
commit
72bf949259
3 changed files with 788 additions and 276 deletions
|
@ -1,3 +1,46 @@
|
||||||
|
2004-04-16 Daniel Jacobowitz <drow@mvista.com>
|
||||||
|
|
||||||
|
* dwarf2read.c: Include "hashtab.h".
|
||||||
|
(struct dwarf2_cu): Add partial_dies, comp_unit_obstack,
|
||||||
|
has_namespace_info.
|
||||||
|
(struct partial_die_info): Add comments. Use bitfields to reduce
|
||||||
|
memory footprint. Add scope, scope_set, has_specification,
|
||||||
|
spec_offset, die_parent, die_child, and die_sibling.
|
||||||
|
(peek_die_abbrev): Add prototype.
|
||||||
|
(partial_read_comp_unit_head): New function, broken out from
|
||||||
|
dwarf2_build_psymtabs_hard.
|
||||||
|
(dwarf2_build_psymtabs_hard): Remove unused variable abbrev_ptr.
|
||||||
|
Use partial_read_comp_unit_head. Initialize the CU and
|
||||||
|
comp_unit_obstack. Update calls to read_partial_die and
|
||||||
|
scan_partial_symbols. Use free_stack_comp_unit and
|
||||||
|
load_partial_dies.
|
||||||
|
(scan_partial_symbols): Change PDI to a pointer. Use the child and
|
||||||
|
sibling pointers to walk partial DIEs. Call fixup_partial_die.
|
||||||
|
Update calls to helper functions. Remove NAMESPACE argument.
|
||||||
|
Update comments.
|
||||||
|
(partial_die_parent_scope, partial_die_full_name): New functions.
|
||||||
|
(add_partial_symbol): Remove namespace argument. Update call to
|
||||||
|
pdi_needs_namespace. Use partial_die_full_name. Handle
|
||||||
|
DW_TAG_namespace. Check has_namespace_info flag.
|
||||||
|
(pdi_needs_namespace): Remove NAMESPACE argument. Just check the
|
||||||
|
tag. Handle namespaces.
|
||||||
|
(add_partial_namespace, add_partial_enumeration): Simplify.
|
||||||
|
(guess_structure_name): New function, derived from
|
||||||
|
add_partial_structure.
|
||||||
|
(add_partial_structure): Remove.
|
||||||
|
(determine_class_name): Update comment.
|
||||||
|
(dwarf2_read_abbrevs): Set has_namespace_info flag.
|
||||||
|
(is_type_tag_for_partial, load_partial_dies): New functions.
|
||||||
|
(read_partial_die): Pass abbrev and abbrev_len as arguments.
|
||||||
|
Record specifications instead of following them immediately.
|
||||||
|
(find_partial_die_in_comp_unit, find_partial_die)
|
||||||
|
(fixup_partial_die, free_stack_comp_unit)
|
||||||
|
(hashtab_obstack_allocate, dummy_obstack_deallocate)
|
||||||
|
(partial_die_hash, partial_die_eq): New functions.
|
||||||
|
* Makefile.in (hashtab_h): Define.
|
||||||
|
(dwarf2read.o): Update dependencies.
|
||||||
|
(observer_inc, observer_h): Move to the correct section.
|
||||||
|
|
||||||
2004-04-15 Joel Brobecker <brobecker@gnat.com>
|
2004-04-15 Joel Brobecker <brobecker@gnat.com>
|
||||||
|
|
||||||
* dwarf2read.c (dwarf2_attribute_true_p): New function.
|
* dwarf2read.c (dwarf2_attribute_true_p): New function.
|
||||||
|
|
|
@ -587,7 +587,7 @@ gdb_sim_d10v_h = $(INCLUDE_DIR)/gdb/sim-d10v.h
|
||||||
gdb_sim_frv_h = $(INCLUDE_DIR)/gdb/sim-frv.h
|
gdb_sim_frv_h = $(INCLUDE_DIR)/gdb/sim-frv.h
|
||||||
gdb_sim_sh_h = $(INCLUDE_DIR)/gdb/sim-sh.h
|
gdb_sim_sh_h = $(INCLUDE_DIR)/gdb/sim-sh.h
|
||||||
splay_tree_h = $(INCLUDE_DIR)/splay-tree.h
|
splay_tree_h = $(INCLUDE_DIR)/splay-tree.h
|
||||||
observer_inc = observer.inc
|
hashtab_h = $(INCLUDE_DIR)/hashtab.h
|
||||||
|
|
||||||
#
|
#
|
||||||
# $BUILD/ headers
|
# $BUILD/ headers
|
||||||
|
@ -599,6 +599,8 @@ exc_request_S_h = exc_request_S.h
|
||||||
msg_reply_S_h = msg_reply_S.h
|
msg_reply_S_h = msg_reply_S.h
|
||||||
msg_U_h = msg_U.h
|
msg_U_h = msg_U.h
|
||||||
notify_S_h = notify_S.h
|
notify_S_h = notify_S.h
|
||||||
|
observer_h = observer.h
|
||||||
|
observer_inc = observer.inc
|
||||||
process_reply_S_h = process_reply_S.h
|
process_reply_S_h = process_reply_S.h
|
||||||
|
|
||||||
#
|
#
|
||||||
|
@ -717,7 +719,6 @@ ns32k_tdep_h = ns32k-tdep.h
|
||||||
nto_tdep_h = nto-tdep.h $(defs_h) $(solist_h)
|
nto_tdep_h = nto-tdep.h $(defs_h) $(solist_h)
|
||||||
objc_lang_h = objc-lang.h
|
objc_lang_h = objc-lang.h
|
||||||
objfiles_h = objfiles.h $(gdb_obstack_h) $(symfile_h)
|
objfiles_h = objfiles.h $(gdb_obstack_h) $(symfile_h)
|
||||||
observer_h = observer.h
|
|
||||||
ocd_h = ocd.h
|
ocd_h = ocd.h
|
||||||
osabi_h = osabi.h
|
osabi_h = osabi.h
|
||||||
pa64solib_h = pa64solib.h
|
pa64solib_h = pa64solib.h
|
||||||
|
@ -1729,7 +1730,7 @@ dwarf2read.o: dwarf2read.c $(defs_h) $(bfd_h) $(symtab_h) $(gdbtypes_h) \
|
||||||
$(objfiles_h) $(elf_dwarf2_h) $(buildsym_h) $(demangle_h) \
|
$(objfiles_h) $(elf_dwarf2_h) $(buildsym_h) $(demangle_h) \
|
||||||
$(expression_h) $(filenames_h) $(macrotab_h) $(language_h) \
|
$(expression_h) $(filenames_h) $(macrotab_h) $(language_h) \
|
||||||
$(complaints_h) $(bcache_h) $(dwarf2expr_h) $(dwarf2loc_h) \
|
$(complaints_h) $(bcache_h) $(dwarf2expr_h) $(dwarf2loc_h) \
|
||||||
$(cp_support_h) $(gdb_string_h) $(gdb_assert_h)
|
$(cp_support_h) $(gdb_string_h) $(gdb_assert_h) $(hashtab_h)
|
||||||
dwarfread.o: dwarfread.c $(defs_h) $(symtab_h) $(gdbtypes_h) $(objfiles_h) \
|
dwarfread.o: dwarfread.c $(defs_h) $(symtab_h) $(gdbtypes_h) $(objfiles_h) \
|
||||||
$(elf_dwarf_h) $(buildsym_h) $(demangle_h) $(expression_h) \
|
$(elf_dwarf_h) $(buildsym_h) $(demangle_h) $(expression_h) \
|
||||||
$(language_h) $(complaints_h) $(gdb_string_h)
|
$(language_h) $(complaints_h) $(gdb_string_h)
|
||||||
|
|
1014
gdb/dwarf2read.c
1014
gdb/dwarf2read.c
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue