aboutsummaryrefslogtreecommitdiff
path: root/gdb/dwarf2read.c
AgeCommit message (Collapse)AuthorFilesLines
2004-04-19 * dwarf2read.c (dwarf2_tmp_obstack, dwarf2_free_tmp_obstack):Daniel Jacobowitz1-54/+10
Delete. (dwarf_alloc_block): Take a CU argument. Use the comp_unit_obstack. (read_attribute_value): Update calls to dwarf_alloc_block. (dwarf2_build_psymtabs_hard): Don't initialize or clean up dwarf2_tmp_obstack. (psymtab_to_symtab_1): Likewise. Clean up using free_stack_comp_unit. (add_to_cu_func_list): Use the comp_unit_obstack.
2004-04-19 * dwarf2read.c (dwarf2_flag_true_p): New function.Joel Brobecker1-2/+24
(die_is_declaration): Use the function above. Add some comments.
2004-04-16 * dwarf2read.c: Back out my previous change, it was incorrect.Joel Brobecker1-22/+2
2004-04-16 * dwarf2read.c: Include "hashtab.h".Daniel Jacobowitz1-272/+740
(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-16 * dwarf2read.c (dwarf2_attribute_true_p): New function.Joel Brobecker1-2/+22
(die_is_declaration): Use the function above.
2004-04-16 * dwarf2read.c (read_structure_scope): Identify stub typesJoel Brobecker1-5/+3
using die_is_declaration() only.
2004-04-02 * dwarf2read.c (dwarf2_objfile_data_key): New.Daniel Jacobowitz1-195/+128
(struct dwarf2_per_objfile, dwarf2_per_objfile): New. (dwarf_info_size, dwarf_abbrev_size, dwarf_line_size) (dwarf_pubnames_size, dwarf_aranges_size, dwarf_loc_size) (dwarf_macinfo_size, dwarf_str_size, dwarf_ranges_size) (dwarf_frame_size, dwarf_eh_frame_size, dwarf_info_buffer) (dwarf_abbrev_buffer, dwarf_line_buffer, dwarf_str_buffer) (dwarf_macinfo_buffer, dwarf_ranges_buffer, dwarf_loc_buffer): Remove variables. (struct dwarf2_pinfo): Remove per-objfile members. Update comments. (DWARF_ABBREV_SIZE, DWARF_LINE_SIZE) (DWARF_LOC_SIZE, DWARF_MACINFO_SIZE, DWARF_STR_SIZE) (DWARF_RANGES_SIZE, DWARF_INFO_BUFFER) (DWARF_ABBREV_BUFFER, DWARF_LINE_BUFFER, DWARF_STR_BUFFER) (DWARF_MACINFO_BUFFER, DWARF_RANGES_BUFFER, DWARF_LOC_BUFFER): Remove macros. (dwarf2_has_info): Take an objfile argument. Allocate per-objfile data. (dwarf2_locate_sections, dwarf2_build_psymtabs) (dwarf2_build_psymtabs_easy, dwarf2_build_psymtabs_hard) (skip_one_die, dwarf2_get_pc_bounds, dwarf2_read_abbrevs) (read_partial_die, read_full_die, read_indirect_string) (dwarf_decode_line_header, dwarf_decode_macros) (dwarf2_symbol_mark_computed): Remove use of removed macros. Update uses of removed variables. (psymtab_to_symtab_1): Restore per-objfile data pointer. Remove use of removed macros. (_initialize_dwarf2_read): New function. * symfile.h (dwarf2_has_info): Update prototype. * coffread.c (coff_symfile_read): Update call to dwarf2_has_info. * elfread.c (elf_symfile_read): Likewise.
2004-03-162004-03-16 David Carlton <carlton@kealia.com>David Carlton1-17/+19
* dwarf2read.c (process_structure_scope): Process children even when we're a declaration.
2004-03-152004-03-15 David Carlton <carlton@kealia.com>David Carlton1-131/+97
Fix for PR c++/1553: * dwarf2read.c (read_structure_type): Determine type name by calling determine_class_name. (determine_class_name): New. (determine_prefix): Look at TYPE_TAG_NAME and call determine_class_name when appropriate. (determine_prefix_aux, class_name): Delete.
2004-03-14 * dwarf2read.c (read_structure_type): Rename fromDaniel Jacobowitz1-46/+98
read_structure_scope. Don't create a symbol or call process_die. Return immediately if die->type is set. Call read_type_die before dwarf2_add_member_fn. (process_structure_scope): New function. (read_enumeration_type, process_enumeration_scope): New functions, broken out from read_enumeration. Don't create the enumeration type if it has already been created. (read_enumeration): Removed. (process_die): Call read_structure_type, process_structure_scope, read_enumeration_type, and process_enumeration_scope. Just call new_symbol for base and subrange types. Add a comment about other type dies. (read_type_die): Call read_enumeration_type. (add_partial_structure, new_symbol): Update comments.
2004-03-09 * dwarf2read.c (skip_leb128, peek_die_abbrev, skip_one_die)Daniel Jacobowitz1-16/+171
(skip_children): New functions. (locate_pdi_sibling): Call skip_children.
2004-03-09 * dwarf2read.c (struct comp_unit_head): Remove dwarf2_abbrevs array.Daniel Jacobowitz1-48/+54
(struct dwarf2_cu): Add abbrev_obstack and dwarf2_abbrevs pointer. Update comment about comp_unit_head. (struct abbrev_info): Shorten two int flags. (dwarf_alloc_abbrev): Take a CU argument. (dwarf2_build_psymtabs_hard): Call dwarf2_free_abbrev_table each time through the loop. Update cleanup argument. (psymtab_to_symtab_1): Update cleanup call. (dwarf2_read_abbrevs, dwarf2_alloc_abbrev): Allocate on the abbrev_obstack. (dwarf2_free_abbrev_table): Renamed from dwarf2_empty_abbrev_table. Just call obstack_free and clear the pointer.
2004-03-05 * dwarf2read.c: Add comment describing memory lifetimes.Daniel Jacobowitz1-28/+46
(struct dwarf2_pinfo): Update comment. (dwarf2_add_field, dwarf2_add_member_fn, read_structure_scope) (read_enumeration, new_symbol): Don't use obsavestring.
2004-02-21 * dwarf2read.c (add_partial_symbol): Fix typo in adding enumeratorsDaniel Jacobowitz1-2/+2
to the partial symbol table.
2004-02-142004-02-14 Elena Zannoni <ezannoni@redhat.com>Elena Zannoni1-1/+0
* symfile.c (init_entry_point_info, entry_point_address): Move from here... * objfiles.c (init_entry_point_info, entry_point_address):..to here. * symfile.h (init_entry_point_info, entry_point_address): Remove prototypes. * objfiles.h (init_entry_point_info, entry_point_address):Add prototypes. * cris-tdep.c: Remove include of symfile.h. Add include of objfiles.h. * infcall.c: Ditto. * mcore-tdep.c: Ditto. * mn10300-tdep.c: Ditto. * sh64-tdep.c: Ditto. * v850-tdep.c: Ditto. * arm-tdep.c: Remove include of symfile.h. * blockframe.c: Ditto. * coffread.c: Ditto. * dbxread.c: Ditto. * dwarf2read.c: Ditto. * dwarfread.c: Ditto. * frv-tdep.c: Ditto. * ia64-tdep.c: Ditto. * mdebugread.c: Ditto. * mipsread.c: Ditto. * rs6000-tdep.c: Ditto. * s390-tdep.c: Ditto. * sh-tdep.c: Ditto. * xstormy16-tdep.c: Ditto. * gdbarch.sh: Remove include of symfile.h. * gdbarch.c: Regenerate. * solib-irix.c (enable_break): Use entry_point_address(). Add comment about include file. * xcoffread.c: Add comment about include file. * Makefile.in (arm-tdep.o, blockframe.o, coffread.o, cris-tdep.o) (dbxread.o, dwarf2read.o, dwarfread.o, frv-tdep.o, gdbarch.o) (ia64-tdep.o, infcall.o, mcore-tdep.o, mdebugread.o, mipsread.o) (mn10300-tdep.o, rs6000-nat.o, s390-tdep.o, sh64-tdep.o) (sh-tdep.o, v850-tdep.o, xstormy16-tdep.o): Update dependencies.
2004-02-072004-02-07 Elena Zannoni <ezannoni@redhat.com>Elena Zannoni1-10/+10
* buildsym.c (free_pending_blocks, finish_block) (record_pending_block, make_blockvector, end_symtab): Replace symbol_obstack with objfile_obstack. * coffread.c (process_coff_symbol, coff_read_struct_type) (coff_read_enum_type): Ditto. * cp-namespace.c (initialize_namespace_symtab) (check_one_possible_namespace_symbol): Ditto. * dwarf2read.c (new_symbol, dwarf2_const_value, macro_start_file) (dwarf2_symbol_mark_computed): Ditto. * dwarfread.c (enum_type, new_symbol, synthesize_typedef): Ditto. * elfread.c (elf_symtab_read): Ditto. * hpread.c (hpread_symfile_init, hpread_symfile_init) (hpread_read_enum_type, hpread_read_function_type) (hpread_read_doc_function_type, hpread_process_one_debug_symbol): Ditto. * jv-lang.c (get_java_class_symtab, add_class_symbol) (java_link_class_type): Ditto. * mdebugread.c (parse_symbol, psymtab_to_symtab_1, new_symtab) (new_symbol): Ditto. * minsyms.c (install_minimal_symbols): Ditto. * objfiles.c (allocate_objfile): Remove init of symbol_obstack. (terminate_minimal_symbol_table): Replace symbol_obstack with objfile_obstack. (free_objfile): Remove freeing of symbol_obstack. * objfiles.h: Remove symbol_obstack field. * pa64solib.c (add_to_solist): Replace symbol_obstack with objfile_obstack. * solib-sunos.c (allocate_rt_common_objfile): Remove init of symbol_obstack. (solib_add_common_symbols): Replace symbol_obstack with objfile_obstack. * somsolib.c (som_solib_add): Ditto. * stabsread.c (patch_block_stabs, define_symbol, read_enum_type) (common_block_start, common_block_end): Ditto. * symfile.c (reread_symbols): Remove freeing and init of symbol_obstack. (allocate_symtab): Rename symbol_obstack to objfile_obstack. * symfile.h: Update comment. * symmisc.c (print_objfile_statistics): Remove symbol_obstack stats printing. * symtab.c (symbol_set_names): Replace symbol_obstack with objfile_obstack. * symtab.h (struct general_symbol_info, struct minimal_symbol): Update comments. * xcoffread.c (read_xcoff_symtab, SYMBOL_DUP, SYMNAME_ALLOC) (init_stringtab, xcoff_initial_scan): Replace symbol_obstack with objfile_obstack.
2004-02-072004-02-07 Elena Zannoni <ezannoni@redhat.com>Elena Zannoni1-4/+4
* dbxread.c (dbx_symfile_init, start_psymtab, end_psymtab, coffstab_build_psymtabs, elfstab_build_psymtabs) (stabsect_build_psymtabs): Replace psymbol_obstack with objfile_obstack. * dwarf2-frame.c (decode_frame_entry_1): Ditto. * dwarf2read.c (dwarf2_build_psymtabs_hard, dwarf2_read_section): Ditto. * dwarfread.c (scan_compilation_units): Ditto. * elfread.c (elfstab_offset_sections): Ditto. * hppa-tdep.c (read_unwind_info): Ditto. * hpread.c (hpread_build_psymtabs, hpread_start_psymtab) (hpread_end_psymtab): Ditto. * mdebugread.c (mdebug_build_psymtabs, add_pending) (parse_partial_symbols, new_psymtab, elfmdebug_build_psymtabs): Ditto. * mips-tdep.c (non_heuristic_proc_desc): Ditto. * objfiles.c (add_to_objfile_sections) (build_objfile_section_table): Ditto. (allocate_objfile): Remove init of psymbol_obstack. (free_objfile): Remove freeing of psymbol_obstack. * objfiles.h (struct objfile): Remove field psymbol_obstack. Update comments. * pa64solib.c (pa64_solib_add_solib_objfile): Replace psymbol_obstack with objfile_obstack. * solib-sunos.c (allocate_rt_common_objfile): Remove init of psymbol_obstack. * somread.c (som_symfile_offsets, init_import_symbols) (init_export_symbols): Replace psymbol_obstack with objfile_obstack. * somsolib.c (som_solib_add_solib_objfile): Ditto. * symfile.c (default_symfile_offsets, syms_from_objfile) (reread_symbols): Remove freeing and init of psymbol_obstack. (cashier_psymtab): Update comment. * symmisc.c (print_objfile_statistics): Don't report stats for psymbol obstack. * symtab.h (struct general_symbol_info, struct partial_symtab): Update comments. * xcoffread.c (xcoff_start_psymtab, xcoff_end_psymtab, swap_sym) (xcoff_symfile_offsets): Replace psymbol_obstack with objfile_obstack.
2004-02-072004-02-07 Elena Zannoni <ezannoni@redhat.com>Elena Zannoni1-10/+10
* objfiles.h (struct objfile): Add objfile_obstack field. Remove type_obstack field. * dwarf2read.c (dwarf2_add_field,dwarf2_add_member_fn, read_structure_scope read_enumeration, new_symbol): Replace type_obstack with objfile_obstack. * dwarfread.c (struct_type, enum_type): Ditto. * gdbtypes.c (alloc_type, alloc_type_instance, init_type) (lookup_fundamental_type): Ditto. * gdbtypes.h (TYPE_ALLOC): Ditto. * hpread.c (hpread_read_enum_type, hpread_read_function_type) (hpread_read_doc_function_type, hpread_read_struct_type) (fix_static_member_physnames, hpread_read_array_type) (hpread_read_subrange_type, hpread_type_lookup): Ditto. * jv-lang.c (java_lookup_class, type_from_class, type_from_class) (java_link_class_type): Ditto. * mdebugread.c (parse_type): Ditto. * objfiles.c (allocate_objfile, free_objfile): Ditto. * solib-sunos.c (solib_add_common_symbols): Ditto. * stabsread.c (define_symbol, read_type, read_member_functions, read_cpp_abbrev, read_one_struct_field): Ditto. * symfile.c (reread_symbols): Ditto. * symmisc.c (print_objfile_statistics): Ditto.
2004-01-282004-01-28 David Carlton <carlton@kealia.com>David Carlton1-3/+18
* dwarf2read.c (add_partial_structure): Use demangled name if namespace equals "".
2004-01-28* dwarf2read.c (read_func_scope): Re-indent comment.Jim Blandy1-21/+21
2004-01-28Clean up misapplied patch:Jim Blandy1-3/+3
* dwarf2read.c (determine_prefix): Change one of the two forward declarations for 'determine_prefix_aux' to a declaration for this. (read_func_scope): Use cu->language, not cu_language. Pass 'cu' argument to 'die_specification'.
2004-01-27 * dwarf2read.c: Update calls to changed and renamed functions, andDaniel Jacobowitz1-268/+293
references to moved variables. (struct dwarf2_cu): Add first_fn, last_fn, cached_fn, language, language_defn, list_in_scope, and ftypes members. (cu_first_fn, cu_last_fn, cu_cached_fn, cu_language) (cu_language_defn, list_in_scope, ftypes, cu_header_offset) (baseaddr): Remove globals. (dwarf_attr): Renamed to dwarf2_attr. Add CU argument. (set_cu_language, die_is_declaration, die_specification) (determine_prefix, determin_prefix_aux, class_name, namespace_name) (dwarf2_linkage_name, dwarf2_name, dwarf2_extension) (dwarf2_get_ref_die_offset, dwarf2_fundamental_type) (initialize_cu_func_list, add_to_cu_func_list): Add CU argument. (dwarf2_build_psymtabs_hard): Add local baseaddr. Initialize cu.list_in_scope. Don't initialize cu_header_offset. (add_partial_symbol): Add local baseaddr. (psymtab_to_symtab_1): Add local baseaddr. Use objfile->section_offsets for consistency. Don't initialize cu_header_offset; do initialize cu.header.offset and cu.list_in_scope. (read_file_scope, read_func_scope, read_lexical_block_scope) (dwarf_decode_lines, new_symbol): Add local baseaddr.
2004-01-262004-01-26 Andrew Cagney <cagney@redhat.com>Andrew Cagney1-2/+2
* dwarf2loc.c (dwarf_expr_frame_base): Use SYMBOL_OPS instead of SYMBOL_LOCATION_FUNCS (dwarf2_loclist_funcs, dwarf2_locexpr_funcs): Change type to "struct symbol_ops". * dwarf2loc.h (dwarf2_locexpr_funcs, dwarf2_loclist_funcs): Change type to "struct symbol_ops". * symtab.h (struct symbol_ops): Rename "struct location_funcs". (struct symbol): Replace ".aux_value.loc.funcs" and ".aux_value.loc.baton" with ".ops" and ".aux_value.ptr". (SYMBOL_OBJFILE): Delete macro. (SYMBOL_LOCATION_FUNCS): Delete macro. (SYMBOL_LOCATION_BATON): Update. * dwarf2read.c (dwarf2_symbol_mark_computed): Set SYMBOL_OPS intead of SYMBOL_LOCATION_FUNCS. * ax-gdb.c (gen_var_ref): Ditto. * printcmd.c (address_info): Ditto. * findvar.c (read_var_value): Ditto. (symbol_read_needs_frame): Ditto.
2004-01-26Index: ChangeLogAndrew Cagney1-0/+9
2004-01-26 Andrew Cagney <cagney@redhat.com> * dwarf2read.c (read_func_scope): Document frame-base hack.
2004-01-232004-01-23 David Carlton <carlton@kealia.com>David Carlton1-2/+59
Patch for PR c++/1520: * dwarf2read.c (read_func_scope): Set processing_current_prefix properly if we have a specification die. (determine_prefix_aux): Rename from determine_prefix. (determine_prefix): Like the old determine_prefix, but never returns NULL.
2004-01-222004-01-22 David Carlton <carlton@kealia.com>David Carlton1-44/+71
* dwarf2read.c (psymtab_to_symtab_1): Calculate lowpc, highpc via get_scope_pc_bounds. (read_file_scope): Ditto. (get_scope_pc_bounds): New function, produced by extracting code from the above two functions, consolidating it, and adding support for DW_TAG_namespace.
2004-01-17 * dwarf2read.c (dwarf2_non_const_array_bound_ignored_complaint):Joel Brobecker1-88/+127
Delete, no longer used. (read_subrange_type): New function, mostly extracted from read_array_type(). (read_array_type): Replace extracted code by call to read_subrange_type(). (dwarf2_get_attr_constant_value): New function. (scan_partial_symbols): Add handling for DW_TAG_subrange_type. (add_partial_symbol): Likewise. (process_die): Likewise. (new_symbol): Likewise. (read_type_die): Likewise.
2004-01-172004-01-16 Andrew Cagney <cagney@redhat.com>Andrew Cagney1-7/+0
* symfile.c: Update copyright year. (compare_symbols): Delete unused function. * stabsread.c: Update copyright year. (lrs_general_complaint): Delete unused function. (ref_search_value): Ditto. (get_substring): Delete declaration. * sh64-tdep.c: Update copyright year. (sh64_get_gdb_regnum): Delete unused function. * dwarf2read.c (dwarf2_unsupported_at_frame_base_complaint): Delete unused function.
2004-01-142004-01-14 David Carlton <carlton@kealia.com>David Carlton1-40/+441
Change symbols for C++ nested types to contain the fully qualified name, if possible. (At least in the DWARF-2 case.) Partial fix for PR's c++/57, c++/488, c++/539, c++/573, c++/609, c++/832, c++/895. * c-exp.y: Update copyright: (qualified_type): Handle types nested within classes. * cp-namespace.c: Update comments. (cp_set_block_scope): Delete #if 0. (cp_lookup_nested_type): Handle types nested within classes. * dwarf2read.c: (scan_partial_symbols): Call add_partial_structure when appropriate. (add_partial_symbol): Add the name of the enclosing namespace to types. (pdi_needs_namespace): New. (add_partial_namespace): Tweak comment. (add_partial_structure): New. (psymtab_to_symtab_1): Initialize processing_current_prefix here... (process_die): instead of here. (read_structure_scope): Try to figure out the name of the class or namespace that the structure might be defined within. (read_enumeration): Generate fully-qualified names, if possible. (read_namespace): Don't set name to NULL. (die_specification): New. (new_symbol): Generate fully-qualified names for types. (read_type_die): Determine appropriate prefix. (determine_prefix): New. (typename_concat): New. (class_name): New. * valops.c: Update copyright. (value_aggregate_elt): Pass NOSIDE to value_struct_elt_for_reference. (value_struct_elt_for_reference): Make static, add NOSIDE parameter, call value_maybe_namespace_elt as a last resort. (value_namespace_elt): Break out code into value_maybe_namespace_elt. (value_maybe_namespace_elt): New. 2004-01-14 David Carlton <carlton@kealia.com> * gdb.cp/namespace.exp: Add tests involving classes defined within namespaces. * gdb.cp/namespace.cc (C::CClass): New. * gdb.cp/namespace1.cc: Update copyright. (C::OtherFileClass): New.
2004-01-092004-01-09 David Carlton <carlton@kealia.com>Elena Zannoni1-41/+60
Checked in by Elena Zannoni <ezannoni@redhat.com>. * dwarf2read.c (read_namespace): Pull out name-generating code into namespace_name. Rename previous_namespace to previous_prefix and processing_current_namespace to processing_current_prefix.. (namespace_name): New function. (add_partial_symbol): Substitute uses of pdi->name with actual_name. * cp-support.h: Rename processing_current_namespace to processing_current_prefix. Update copyright year. * cp-namespace.c: Rename processing_current_namespace to processing_current_prefix. Update copyright year.
2004-01-092004-01-09 Elena Zannoni <ezannoni@redhat.com>Elena Zannoni1-11/+2
* dwarf2read.c (read_array_type): Discard FORTRAN_HACK macro and ifdeffed code. Update copyright year.
2003-12-13* dwarf2read.c (dwarf2_add_member_fn, read_structure_scope):Jim Blandy1-2/+4
Replace uses of DEPRECATED_STREQ and DEPRECATED_STREQN with calls to strcmp and strncmp.
2003-12-02 * dwarf2read.c (dwarf_info_offset, dwarf_abbrev_offset)Daniel Jacobowitz1-87/+30
(dwarf_line_offset, dwarf_pubnames_offset, dwarf_aranges_offset) (dwarf_loc_offset, dwarf_macinfo_offset, dwarf_str_offset) (dwarf_ranges_offset, dwarf_frame_offset, dwarf_eh_frame_offset): Delete. (dwarf2_read_section): Remove offset and size arguments. Use bfd_get_section_size_before_reloc and sectp->filepos. (dwarf2_has_info): Clear section variables instead of offsets. (dwarf2_locate_sections): Don't initialize the deleted variables. (dwarf2_build_psymtabs): Update calls to dwarf2_read_section. (dwarf2_build_psymtabs_easy): Likewise. * dwarf2-frame.c (dwarf_frame_offset, dwarf_frame_size) (dwarf_eh_frame_offset, dwarf_eh_frame_size): Remove extern declarations. (dwarf2_read_section): Update prototype. (dwarf2_build_frame_info): Update calls to dwarf2_read_section. Use bfd_get_section_size_before_reloc instead of global size variables.
2003-11-232003-11-23 Andrew Cagney <cagney@redhat.com>Andrew Cagney1-2/+2
* symfile.c (symbol_file_command): Replace STREQ with strcmp. * defs.h (DEPRECATED_STREQN): Rename STREQN. (DEPRECATED_STREQ): Rename STREQ. * ada-exp.y, ada-lang.c, ada-lex.l, coffread.c: Update. * config/mips/tm-irix5.h, config/mips/tm-irix6.h: Update. * config/mips/tm-mipsv4.h, config/sparc/tm-sun4sol2.h: Update. * dbxread.c, dwarf2read.c, dwarfread.c, environ.c: Update. * eval.c, exec.c, f-lang.c, hppa-tdep.c, hpread.c: Update. * jv-exp.y, language.c, m2-exp.y, mcore-rom.c: Update. * mdebugread.c, mipsread.c, objc-exp.y, objfiles.c: Update. * p-exp.y, p-typeprint.c, p-valprint.c, rs6000-nat.c: Update. * source.c, sparc-tdep.c, stack.c, target.c: Update.
2003-11-19 * dwarf2read.c (offreg, basereg, isderef, frame_base_reg)Daniel Jacobowitz1-133/+21
(frame_base_offset): Delete. (read_func_scope): Delete call to decode_locdesc. (decode_locdesc): Update comments. Don't set the removed variables. Complain for DW_OP_reg* not at the end. Remove DW_OP_breg* and DW_OP_fbreg support.
2003-11-18 * dwarf2read.c (optimized_out, islocal): Remove.Daniel Jacobowitz1-17/+5
(decode_locdesc): Update comments. Don't set optimized_out or islocal.
2003-11-12 * dwarf2read.c (struct dwarf2_cu): New type.Daniel Jacobowitz1-371/+338
(dwarf2_build_psymtabs_hard, psymtab_to_symtab_1): Create a dwarf2_cu structure to pass down. (scan_partial_symbols, add_partial_symbol, add_partial_namespace) (add_partial_enumeration, locate_pdi_sibling, process_die) (read_file_scope, read_func_scope) (read_lexical_block_scope, dwarf2_get_pc_bounds) (dwarf2_add_field, dwarf2_attach_fields_to_type) (dwarf2_add_member_fn, dwarf2_attach_fn_fields_to_type) (read_structure_scope, read_enumeration, read_array_type) (read_common_block, read_namespace, read_tag_pointer_type) (read_tag_ptr_to_member_type, read_tag_reference_type) (read_tag_const_type, read_tag_volatile_type, read_tag_string_type) (read_subroutine_type, read_typedef, read_base_type, read_comp_unit) (read_die_and_children, read_die_and_siblings, dwarf2_read_section) (dwarf2_read_abbrevs, dwarf2_lookup_abbrev, read_partial_die) (read_full_die. read_attribute_value, read_attribute) (read_address, dwarf_decode_line_header, dwarf_decode_lines) (var_decode_location, new_symbol, dwarf2_const_value, die_type) (die_containing_type, type_at_offset, tag_type_to_type) (read_type_die, dwarf_base_type, decode_locdesc, dwarf_decode_macros) (dwarf2_symbol_mark_computed): Accept and use a dwarf2_cu object.
2003-11-082003-11-07 Andrew Cagney <cagney@redhat.com>Andrew Cagney1-11/+11
* top.c (print_gdb_version): Replace STREQ with strcmp. * valops.c (value_struct_elt_for_reference): Ditto. (value_struct_elt_for_reference): Ditto. * symtab.c (gdb_mangle_name): Ditto. (find_line_symtab): Ditto. * symmisc.c (maintenance_print_symbols): Ditto. * symfile.c (symbol_file_command): Ditto. * stabsread.c (define_symbol, read_type): Ditto. (cleanup_undefined_types, scan_file_globals): Ditto. * solib.c (solib_map_sections): Ditto. * solib-svr4.c (bfd_lookup_symbol): Ditto. * rs6000-tdep.c (skip_prologue): Ditto. * p-valprint.c (pascal_value_print): Ditto. (pascal_object_is_vtbl_ptr_type): Ditto. * objfiles.c (in_plt_section): Ditto. * minsyms.c (lookup_minimal_symbol): Ditto. (compact_minimal_symbols): Ditto. (find_solib_trampoline_target): Ditto. * mdebugread.c (parse_type): Ditto. * language.c (set_language_command): Ditto. (set_type_command, set_range_command): Ditto. * f-lang.c (add_common_block): Ditto. (add_common_block): Ditto. (find_first_common_named): Ditto. (patch_all_commons_by_name): Ditto. * elfread.c (elf_locate_sections): Ditto. (elf_locate_sections): Ditto. (elfstab_offset_sections): Ditto. * dwarf2read.c (dwarf2_locate_sections): Ditto. * dbxread.c (add_old_header_file): Ditto. (find_corresponding_bincl_psymtab): Ditto. (read_dbx_symtab, process_one_symbol): Ditto. * coffread.c (patch_opaque_types): Ditto. * cli/cli-decode.c (delete_cmd): Ditto. * cli/cli-cmds.c (pwd_command, list_command): Ditto. * c-typeprint.c (c_type_print_base): Ditto. * breakpoint.c (bpstat_stop_status): Ditto. (clear_command, breakpoint_re_set_one): Ditto.
2003-10-02* dwarf2read.c (struct die_info): Doc fix.Jim Blandy1-0/+7
2003-09-302003-09-30 David Carlton <carlton@kealia.com>David Carlton1-96/+123
* dwarf2read.c (struct die_info): Add 'parent' field; replace 'has_children' and 'next' by 'child' and 'sibling'. (read_comp_unit): Rework algorithm, breaking body into read_die_and_children and read_die_and_siblings. (read_die_and_children, read_die_and_siblings): New. (read_full_die): Add 'has_children' argument; set it instead of the die's 'has_children' field. Minor formatting cleanup. (free_die_list): Use die->child and die->sibling instead of die->next. (dump_die_list): Ditto. (sibling_die): Use die->sibling. (psymtab_to_symtab_1): Use die's 'child' field in place of its 'has_children' and 'next' fields. (process_die, read_file_scope, read_func_scope) (read_lexical_block_scope, read_structure_scope) (read_enumeration, read_array_type, read_common_block) (read_namespace, read_subroutine_type, dump_die): Ditto.
2003-09-23* dwarf2read.c (read_array_type): When building the type for anJim Blandy1-2/+8
array of unspecified length, make sure to choose the upper bound so that the array's total length comes out to be zero --- that's how we represent such arrays.
2003-09-212003-09-20 Andrew Cagney <cagney@redhat.com>Andrew Cagney1-2/+0
* breakpoint.c: Eliminate ARGSUSED. * buildsym.c, cli/cli-cmds.c, cli/cli-script.c: Ditto. * coffread.c, corelow.c, dwarf2read.c, event-top.c: Ditto. * exec.c, gcore.c, hpux-thread.c, infcmd.c, inflow.c: Ditto. * infrun.c, inftarg.c, maint.c, ocd.c, printcmd.c: Ditto. * procfs.c, regcache.c, remote-rdi.c, remote-sds.c: Ditto. * remote.c, sol-thread.c, source.c, stabsread.c: Ditto. * stack.c, symfile.c, target.c, top.c, typeprint.c: Ditto. * utils.c, v850ice.c, valprint.c, values.c, win32-nat.c: Ditto. * wince.c, remote-vx.c: Ditto.
2003-09-162003-09-16 Andrew Cagney <cagney@redhat.com>Andrew Cagney1-6/+6
* buildsym.c: Remove more occurances of "register". * coffread.c, dbxread.c, dcache.c, dwarf2read.c: Ditto. * environ.c, eval.c, f-valprint.c, findvar.c: Ditto. * gdbtypes.c, gnu-v2-abi.c, h8300-tdep.c, hppa-tdep.c: Ditto. * infcmd.c, mdebugread.c, minsyms.c, mips-tdep.c: Ditto. * printcmd.c, remote-vx.c, sh-stub.c, sh-tdep.c: Ditto. * sh64-tdep.c, source.c, stabsread.c, stack.c: Ditto. * standalone.c, symfile.c, symmisc.c, symtab.c: Ditto. * utils.c, valops.c, values.c, xcoffread.c: Ditto.
2003-09-15 * dwarf2read.c (dwarf2_get_pc_bounds): Complain if offsetKevin Buettner1-1/+9
associated with DW_AT_ranges attribute is out of bounds.
2003-09-142003-09-14 Andrew Cagney <cagney@redhat.com>Andrew Cagney1-2/+2
* alpha-nat.c: Remove some occurances of "register". * alpha-tdep.c, arm-tdep.c, blockframe.c, breakpoint.c: Ditto. * buildsym.c, c-typeprint.c, c-valprint.c, coffread.c: Ditto. * corefile.c, cp-support.c, cp-valprint.c, cris-tdep.c: Ditto. * dbxread.c, dcache.c, dwarf2read.c, elfread.c: Ditto. * environ.c, eval.c, event-top.c, f-typeprint.c: Ditto. * f-valprint.c, findvar.c, frame.c, gdbtypes.c: Ditto. * h8300-tdep.c, hppa-tdep.c, hppab-nat.c, hppah-nat.c: Ditto. * hppam3-nat.c, hpread.c, ia64-aix-nat.c, ia64-linux-nat.c: Ditto. * infcall.c, infcmd.c, inflow.c, infptrace.c, infrun.c: Ditto. * infttrace.c, irix5-nat.c, jv-typeprint.c: Ditto. * jv-valprint.c, m68k-tdep.c, m68klinux-nat.c, main.c: Ditto. * mdebugread.c, minsyms.c, mips-linux-tdep.c: Ditto. * mips-nat.c, mips-tdep.c, mipsread.c, mipsv4-nat.c: Ditto. * ns32k-tdep.c, objfiles.c, p-typeprint.c: Ditto. * p-valprint.c, ppc-linux-nat.c, printcmd.c: Ditto. * remote-mips.c, remote-vx.c, rs6000-nat.c: Ditto. * rs6000-tdep.c, scm-exp.c, sh-tdep.c, sh64-tdep.c: Ditto. * solib.c, somread.c, source.c, sparc-tdep.c: Ditto. * stabsread.c, stack.c, standalone.c, symfile.c: Ditto. * symmisc.c, symtab.c, top.c, tracepoint.c: Ditto. * typeprint.c, utils.c, valarith.c, valops.c: Ditto. * values.c, vax-tdep.c, xcoffread.c: Ditto.
2003-09-122003-09-12 Andrew Cagney <cagney@redhat.com>Andrew Cagney1-2/+2
* objfiles.h (struct entry_info): Deprecate "entry_file_lowpc" and "entry_file_highpc". Update comments. * defs.h (deprecated_inside_entry_file): Rename "inside_entry_file". * blockframe.c (deprecated_inside_entry_file): Rename "inside_entry_file". * frame.c (get_prev_frame): Update. Use if 0 instead of #if 0. * vax-tdep.c (vax_frame_chain): Update. * sh64-tdep.c (sh64_frame_chain): Update. * sh-tdep.c (sh_frame_chain): Update. * rs6000-tdep.c (rs6000_frame_chain): Update. * ns32k-tdep.c (ns32k_frame_chain): Update. * mips-tdep.c (mips_frame_chain): Update. * m68hc11-tdep.c (m68hc11_frame_this_id): Update. * m32r-tdep.c (m32r_frame_this_id): Update. * i386-interix-tdep.c (i386_interix_frame_chain_valid): Update. * frv-tdep.c (frv_frame_this_id): Update. * d10v-tdep.c (d10v_frame_this_id): Update. * cris-tdep.c (cris_frame_chain): Update. * blockframe.c (legacy_frame_chain_valid): Update. * avr-tdep.c (avr_frame_this_id): Update. * arm-tdep.c (arm_prologue_this_id): Update. * alpha-tdep.c (alpha_heuristic_frame_this_id): Update. * objfiles.c (objfile_relocate): Update. * mipsread.c (mipscoff_symfile_read): Update. (mipscoff_symfile_read): Update. * mdebugread.c (parse_partial_symbols): Update. * dwarfread.c (read_file_scope): Update. * dwarf2read.c (read_file_scope): Update. * dbxread.c (read_dbx_symtab): Update. (read_dbx_symtab): Update. * coffread.c (complete_symtab): Update.
2003-09-112003-09-11 David Carlton <carlton@kealia.com>David Carlton1-44/+128
* gdbtypes.h: Add TYPE_CODE_NAMESPACE. * gdbtypes.c (init_type): Handle TYPE_CODE_NAMESPACE. (recursive_dump_type): Ditto. * printcmd.c (print_formatted): Ditto. * typeprint.c (print_type_scalar): Ditto. * c-typeprint.c (c_type_print_varspec_prefix): Ditto. (c_type_print_varspec_suffix, c_type_print_base): Ditto. * cp-support.h: Declare cp_check_possible_namespace_symbols, maint_cplus_cmd_list. * cp-support.c: Make maint_cplus_cmd_list extern. * cp-namespace.c: Include objfiles.h, gdbtypes.h, dictionary.h, command.h. (lookup_symbol_file): Look in possible namespace blocks when appropriate. (initialize_namespace_symtab): New. (get_possible_namespace_block, free_namespace_block) (check_possible_namespace_symbols) (check_possible_namespace_symbols_loop) (check_one_possible_namespace_symbol) (lookup_possible_namespace_symbol, maintenance_cplus_namespace) (_initialize_cp_namespace): Ditto. * block.h: Declare allocate_block. * block.c (allocate_block): New. * jv-lang.c (get_java_class_symtab): Allocate blocks via allocate_block. * symfile.h: Update declaration of add_psymbol_to_list. * symfile.c (add_psymbol_to_list): Return the partial symbol in question. * dwarf2read.c (dwarf2_build_psymtabs_hard): Add argument to scan_partial_symbols_call. (scan_partial_symbols): Add NAMESPACE argument; update calls to helper functions. (add_partial_symbol): If necessary, scan mangled names for names of namespaces. (add_partial_namespace): Add NAMESPACE argument; generate partial symbols associated to namespaces. (add_partial_enumeration): Add NAMESPACE argument. (new_symbol): Allow namespace syms. (read_namespace): Generate namespace syms. * objfiles.h: Add opaque declaration of struct symtab. (struct objfile): Add cp_namespace_symtab member. * objfiles.c (allocate_objfile): Set objfile->cp_namespace_symtab. * Makefile.in (cp-namespace.o): Depend on objfiles_h, gdbtypes_h, dictionary_h, command_h. 2003-09-11 David Carlton <carlton@kealia.com> * gdb.c++/namespace.exp: Add tests for namespace types. * gdb.c++/maint.exp (test_help): Test 'help maint cp namespace'. (test_namespace): New.
2003-09-092003-09-09 David Carlton <carlton@kealia.com>David Carlton1-77/+145
* dwarf2read.c (dwarf2_build_psymtabs_hard): Move lowpc and highpc initialization here out of scan_partial_symbols. (scan_partial_symbols): Restructure into a recursive version, calling add_partial_namespace and add_partial_enumeration when appropriate. (add_partial_namespace): New. (add_partial_enumeration, locate_pdi_sibling): Ditto.
2003-08-26 * dwarf2read.c (dwarf_attr_name): Move DW_AT_MIPS_linkage_nameJason Merrill1-1/+1
case out of #ifdef MIPS block.
2003-07-31 * dwarf2read.c (new_symbol): Use var_decode_location for parameters.Daniel Jacobowitz1-26/+4