summaryrefslogtreecommitdiffstats
path: root/gdb/dwarf2read.c
Commit message (Collapse)AuthorAgeFilesLines
* 2003-04-15 David Carlton <carlton@math.stanford.edu>David Carlton2003-04-151-3/+103
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Makefile.in (SFILES): Add cp-namespace.c. (COMMON_OBS): Add cp-namespace.o. (block.o): Depend on gdb_obstack_h and cp_support_h. (buildsym.o): Depend on cp_support_h. (cp-namespace.o): New. (cp-support.o): Depend on gdb_string_h, demangle_h, gdb_assert_h, gdb_obstack_h, symtab_h, symfile_h, and gdbcmd_h. (dwarf2read.o): Depend on cp_support_h. * jv-lang.c (get_java_class_symtab): Set BLOCK_NAMESPACE. * dwarf2read.c (process_die): Set processing_has_namespace_info, processing_current_namespace. (read_namespace): Update processing_current_namespace; check for anonymous namespaces. (dwarf2_name): New function. (dwarf2_extension): Ditto. * cp-support.h: Update copyright, contributors. Add inclusion guards. Add opaque declaration for structs obstack, block, symbol. (struct using_direct): New struct. Add declarations for cp_find_first_component, cp_entire_prefix_len, processing_has_namespace_info, processing_current_namespace, cp_is_anonymous, cp_add_using_directive, cp_initialize_namespace, cp_finalize_namespace, cp_set_block_scope, cp_scan_for_anonymous_namespaces. * cp-namespace.c: New file. * cp-support.c: Update copyright. Include ctype.h, gdb_assert.h, gdbcmd.h. New variable maint_cplus_cmd_list. (cp_find_first_component): New function. (cp_entire_prefix_len, maint_cplus_command) (first_component_command, _initialize_cp_support): Ditto. * buildsym.c: Include cp-support.h. New variable using_list. (add_symbol_to_list): Check for anonymous namespaces. (finish_block): Set block's scope. (start_symtab): Initialize C++ namespace support. (end_symtab): Finalize C++ namespace support. * block.h: Add opaque declarations for structs block_namespace_info, using_direct, and obstack. Add declarations for block_set_scope and block_set_using. (struct block): Add 'language_specific' member. (BLOCK_NAMESPACE): New macro. * block.c: Include gdb_obstack.h and cp-support.h. (struct block_namespace_info): New struct. (block_set_scope): New function. (block_set_using, block_initialize_namespace): Ditto. 2003-04-15 David Carlton <carlton@math.stanford.edu> * gdb.c++/maint.exp: New file.
* 2003-04-13 Daniel Jacobowitz <drow@mvista.com>Daniel Jacobowitz2003-04-131-47/+104
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * dwarf2expr.c (dwarf2_read_address): Renamed from read_address; made non-static. (execute_stack_op): All callers updated. * dwarf2expr.h: Add prototype for dwarf2_read_address. * dwarf2loc.c (find_location_expression): New function. (dwarf_expr_frame_base): Call it. (dwarf2_evaluate_loc_desc): Handle 0-length location expressions. (dwarf2_tracepoint_var_ref): New function, broken out from locexpr_tracepoint_var_ref. (locexpr_tracepoint_var_ref): Call dwarf2_tracepoint_var_ref. Make static. (loclist_read_variable, loclist_read_needs_frame): New functions. (loclist_describe_location, loclist_tracepoint_var_ref): New functions. (dwarf2_loclist_funcs): New struct location_funcs. * dwarf2loc.h (struct dwarf2_loclist_baton): New type. (struct dwarf2_locexpr_baton): Add comments. (dwarf2_loclist_funcs): New extern. * dwarf2read.c (struct comp_unit_head): Remove DIE member, add base_address and base_known. (dwarf_loc_buffer): New variable. (struct dwarf2_pinfo): Add dwarf_loc_buffer and dwarf_loc_size. (DWARF_LOC_BUFFER, DWARF_LOC_SIZE): New macros. (dwarf2_has_info): Initialize dwarf_loc_offset. (dwarf2_build_psymtabs): Read in .debug_loc. (dwarf2_build_psymtabs_hard): Use DWARF_LOC_BUFFER and DWARF_LOC_SIZE. (psymtab_to_symtab_1): Likewise. Move base address calculation here, from... (dwarf2_get_pc_bounds): ... here. Use the base address from cu_header. (dwarf2_symbol_mark_computed): Handle location lists.
* 2003-02-25 David Carlton <carlton@math.stanford.edu>David Carlton2003-02-251-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * symtab.h (SYMBOL_NATURAL_NAME): New macro. (SYMBOL_LINKAGE_NAME): Ditto. (SYMBOL_PRINT_NAME): Use SYMBOL_NATURAL_NAME and SYMBOL_LINKAGE_NAME. (struct general_symbol_info): Expand comment. (DEPRECATED_SYMBOL_NAME): Rename from SYMBOL_NAME. (SYMBOL_MATCHES_NAME): Use DEPRECATED_SYMBOL_NAME. (SYMBOL_MATCHES_REGEXP): Ditto. * symtab.c (symbol_natural_name): New function. * objfiles.h: Replace all uses of SYMBOL_NAME by DEPRECATED_SYMBOL_NAME. * xcoffread.c, valops.c, typeprint.c, tracepoint.c: Ditto. * symtab.c, symmisc.c, symfile.c, stack.c, stabsread.c: Ditto. * somsolib.c, sol-thread.c, rs6000-tdep.c, p-valprint.c: Ditto. * printcmd.c, objfiles.c, objc-lang.c, mipsread.c: Ditto. * minsyms.c, mdebugread.c, linespec.c, jv-lang.c: Ditto. * i386-tdep.c, i386-linux-tdep.c, hpread.c, hppa-tdep.c: Ditto. * gnu-v2-abi.c, f-valprint.c, findvar.c, expprint.c: Ditto. * dwarfread.c, dwarf2read.c, dbxread.c, c-valprint.c: Ditto. * cp-valprint.c, coffread.c, buildsym.c, breakpoint.c: Ditto. * blockframe.c, ax-gdb.c, arm-linux-tdep.c, ada-lang.c: Ditto. * ada-exp.y: Ditto. * ada-exp.y: Update copyright. * sol-thread.c, mipsread.c, jv-lang.c, f-valprint.c: Ditto. * cp-valprint.c: Ditto. 2003-02-25 David Carlton <carlton@math.stanford.edu> * generic/gdbtk.h: Replace all instances of SYMBOL_NAME by DEPRECATED_SYMBOL_NAME. * generic/gdbtk-stack.c, generic/gdbtk-cmds.c: Ditto. * generic/gdbtk-stack.c, generic/gdbtk-cmds.c: Update copyright. 2003-02-25 David Carlton <carlton@math.stanford.edu> * mi-cmd-stack.c: Replace all instances of SYMBOL_NAME with DEPRECATED_SYMBOL_NAME. Update copyright.
* Based on a patch from Daniel Berlin (dberlin@dberlin.org).Daniel Jacobowitz2003-02-211-98/+102
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * symtab.h: Add opaque declarations of struct axs_value and struct agent_expr. (enum address_class): Add LOC_COMPUTED and LOC_COMPUTED_ARG. (struct location_funcs): New type. (struct symbol): Add "loc" to aux_value. (SYMBOL_LOCATION_BATON, SYMBOL_LOCATION_FUNCS): New macros. * dwarf2read.c: Include "dwarf2expr.h". (dwarf2_symbol_mark_computed): New function. (read_func_scope): Use it. (var_decode_location): New function. (new_symbol): Use it. * dwarf2expr.c, dwarf2expr.h, dwarf2loc.c, dwarf2loc.h: New files. * Makefile.in (SFILES): Add dwarf2loc.c and dwarf2expr.c. (dwarf2expr_h, dwarf2loc_h): New variables. (COMMON_OBS): Add dwarf2expr.o and dwarf2loc.o. (dwarf2expr.o, dwarf2loc.o): New rules. (dwarf2read.o): Add $(dwarf2expr_h) and $(dwarf2loc_h). * buildsym.c (finish_block): Handle LOC_COMPUTED and LOC_COMPUTED_ARG. * findvar.c (symbol_read_needs_frame, read_var_value): Likewise. * m2-exp.y (yylex): Likewise. * printcmd.c (address_info, print_frame_args): Likewise. * stack.c (print_block_frame_locals, print_frame_arg_vars): Likewise. * symmisc.c (print_symbol, print_partial_symbols): Likewise. * ada-lang.c (ada_resolve_subexp, symtab_for_sym) (ada_add_block_symbols, fill_in_ada_prototype): Likewise. * symtab.c (lookup_block_symbol): Likewise.
* * dwarf2read.c (dwarf2_get_pc_bounds): Offset addresses by base.Daniel Jacobowitz2003-02-141-0/+3
|
* * dwarf2read.c (dwarf2_locate_sections): When we find a macro infoJim Blandy2003-02-041-1/+1
| | | | | section, let dwarf_macinfo_section point to it, not dwarf_loc_section.
* * defs.h (streq): Add prototype.Daniel Jacobowitz2003-02-041-11/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * utils.c (streq): New function. * dwarf2read.c (new_symbol): Use SYMBOL_SET_NAMES instead of SYMBOL_NAME and SYMBOL_INIT_DEMANGLED_NAME. * mdebugread.c (new_symbol): Likewise. * stabsread.c (define_symbol): Likewise. * coffread.c (process_coff_symbol): Likewise. * dwarfread.c (new_symbol): Likewise. * minsyms.c (prim_record_minimal_symbol_and_info): Use SYMBOL_SET_NAMES instead of setting SYMBOL_NAME. Set the language here. (install_minimal_symbols): Don't set SYMBOL_LANGUAGE or call SYMBOL_INIT_DEMANGLED_NAME. * objfiles.c: Include "hashtab.h". (allocate_objfile): Call htab_set_functions_ex for the demangled_names_hash. (free_objfile): Call htab_delete for the demangled_names_hash. * objfiles.h (struct htab): Add declaration. (struct objfile): Add demangled_names_hash. * symfile.c: Include "hashtab.h". (reread_symbols): Call htab_delete for the demangled_names_hash. (add_psymbol_to_list): Use SYMBOL_SET_NAMES instead of putting SYMBOL_NAME in the bcache. * symtab.c: Include "hashtab.h". Update comments. (create_demangled_names_hash, symbol_set_names): New functions. (symbol_find_demangled_name): New function, broken out from symbol_init_demangled_names. (symbol_init_demangled_names): Use it. * symtab.h (SYMBOL_INIT_DEMANGLED_NAME): Add missing parentheses. (SYMBOL_SET_NAMES): New macro. (symbol_set_names): Add prototype.
* 2003-02-03 Michal Ludvig <mludvig@suse.cz>Michal Ludvig2003-02-031-21/+36
| | | | | | * dwarf2cfi.c (pointer_encoding): Added new parameter. * dwarf2cfi.c, dwarf2read.c: Changed all warnings and error messages to contain BFD filename.
* 2003-01-31 David Carlton <carlton@math.stanford.edu>David Carlton2003-02-011-0/+1
| | | | | * dwarf2read.c (dwarf2_locate_sections): Set dwarf_ranges_section.
* * dbxread.c (stabs_data): New static variable.Daniel Jacobowitz2003-01-311-12/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | (fill_symbuf): Support an in-memory buffer for stabs data. (stabs_seek): New function. (dbx_psymtab_to_symtab): Relocate the stabs data if necessary. (read_ofile_symtab): Use stabs_seek. (elfstab_build_psymtabs): Take an asection* instead of an offset and size. Relocate the stabs data if necessary. Save the section* for dbx_psymtab_to_symtab. * dwarf2read.c: Add section variables for each debug section. (dwarf2_locate_sections): Fill them in. (dwarf2_read_section): Take an asection* argument. Relocate the section contents if necessary. (dwarf2_build_psymtabs, dwarf2_build_psymtabs_easy): Update callers. * dwarf2cfi.c (parse_frame_info): Take a section argument and pass it to dwarf2_read_section. (dwarf2_build_frame_info): Update callers. * elfread.c (elf_symfile_read): Update call to elfstab_build_psymtabs. * gdb-stabs.h (struct dbx_symfile_info): Add stab_section. (DBX_STAB_SECTION): New macro. * stabsread.h (elfstab_build_psymtabs): Update prototype. * symfile.c (symfile_dummy_outputs): New function. (symfile_relocate_debug_section): New function. * symfile.h (symfile_relocate_debug_section): Add prototype.
* Fix PR gdb/961.Daniel Jacobowitz2003-01-301-23/+199
| | | | | | | | | | | | | | | | | * dwarf2read.c (dwarf_ranges_offset, dwarf_ranges_size): New variables. (RANGES_SECTION): New. (dwarf_ranges_buffer): New variable. (struct comp_unit_head): Add member "die". (struct dwarf2_pinfo): Add dwarf_ranges_buffer, dwarf_ranges_size. (DWARF_RANGES_BUFFER, DWARF_RANGES_SIZE): New. (dwarf2_has_info): Init dwarf_ranges_offset and dwarf_ranges_size. (dwarf2_locate_sections): Likewise. (dwarf2_build_psymtabs): Read .debug_ranges. (dwarf2_build_psymtabs_hard): Swap dwarf_ranges out. (psymtab_to_symtab_1): Swap dwarf_ranges in. Set cu_header.die. (dwarf2_get_pc_bounds): New cu_header argument; adjust all callers. Look for DW_AT_ranges and return the bounding box.
* 2003-01-18 Andrew Cagney <ac131313@redhat.com>Andrew Cagney2003-01-181-6/+6
| | | | | | | | | | | * ada-valprint.c: Eliminate PTR. * breakpoint.c, corelow.c, cris-tdep.c, dbxread.c: Ditto. * defs.h, dve3900-rom.c, dwarf2read.c, dwarfread.c: Ditto. * exec.c, hppa-tdep.c, hpread.c, infcmd.c, mdebugread.c: Ditto. * objfiles.c, objfiles.h, ocd.c, remote-es.c: Ditto. * remote-mips.c, remote-sds.c, remote-vx.c: Ditto. * solib-svr4.c, solib.c, stack.c, symfile.c, symfile.h: Ditto. * symmisc.c, v850ice.c, xcoffread.c, cli/cli-script.c: Ditto.
* Convert complain() to complaint().Kevin Buettner2002-12-111-195/+141
|
* 2002-12-05 David Carlton <carlton@math.stanford.edu>David Carlton2002-12-051-10/+20
| | | | | | | | * dwarf2read.c (dwarf2_add_field): Treat a field that is a DW_TAG_member as well as a declaration as being a C++ static data member. (read_structure_scope): Combine tests for DW_TAG_member and DW_TAG_variable.
* 2002-11-25 David Carlton <carlton@math.stanford.edu>David Carlton2002-11-251-1/+3
| | | | | * dwarf2read.c (scan_partial_symbols): Descend into namespace pdi's with no name.
* * gdbtypes.h (struct main_type): Move artificial flag out ofDaniel Jacobowitz2002-11-111-0/+4
| | | | | | | | | | | | | | | | | | | | loc. New member of ``struct field'' named static_kind. Reduce overloaded meaning of bitsize. (FIELD_ARTIFICIAL, SET_FIELD_PHYSNAME, SET_FIELD_PHYSADDR) (TYPE_FIELD_STATIC, TYPE_FIELD_STATIC_HAS_ADDR): Likewise. (FIELD_STATIC_KIND, TYPE_FIELD_STATIC_KIND): New macros. * ada-lang.c (fill_in_ada_prototype): Initialize static_kind for new fields. (template_to_fixed_record_type, template_to_static_fixed_type) (to_record_with_fixed_variant_part): Likewise. * coffread.c (coff_read_struct_type, coff_read_enum_type): Likewise. * dwarf2read.c (dwarf2_add_field, read_enumeration): Likewise. * dwarfread.c (struct_type, enum_type): Likewise. * hpread.c (hpread_read_enum_type) (hpread_read_function_type, hpread_read_doc_function_type) (hpread_read_struct_type): Likewise. * mdebugread.c (parse_symbol): Likewise.
* * dwarf2read.c (read_func_scope): Restore list_in_scope properlyJim Blandy2002-11-081-1/+4
| | | | | | when we finish a function a context. * buildsym.h (outermost_context_p): New macro. (Bug analyzed by David Edelsohn.)
* * dwarf2read.c (read_func_scope): Restore local_symbols andJim Blandy2002-11-081-0/+8
| | | | | param_symbols after we finish the function context. (Based on a patch from David Edelsohn.)
* 2002-10-25 Andrew Cagney <cagney@redhat.com>Andrew Cagney2002-10-251-33/+33
| | | | | | | | | | | | | | | | | | | | | | | | * complaints.h (struct deprecated_complaint): Rename `struct complaint'. * complaints.c (complain): Update. * remote-vx68.c, remote-vxmips.c, remote-vxsparc.c: Delete incorrect comment indicating that "symfile.h" was being included for the `struct complaint' definition. * remote-vx.c: Update. * objc-lang.c: Update. * xcoffread.c: Update. * hpread.c: Update. * mdebugread.c: Update. * stabsread.c: Update. * dwarf2read.c: Update. * dwarfread.c: Update. * elfread.c: Update. * coffread.c: Update. * stabsread.h: Update. * dbxread.c: Update. * buildsym.c: Update. * gdbtypes.c: Update. * macrotab.c: Update.
* 2002-10-23 David Carlton <carlton@math.stanford.edu>David Carlton2002-10-231-13/+121
| | | | | | | | | | * dwarf2read.c (dwarf_tag_name): Add DWARF 3 names. (dwarf_attr_name): Ditto. (dwarf_type_encoding_name): Ditto. (scan_partial_symbols): Descend into DW_TAG_namespace entries. (process_die): Handle DW_TAG_namespace, DW_TAG_imported_declaration, DW_TAG_imported_module. (read_namespace): New function.
* 2002-10-21 Jim Blandy <jimb@redhat.com>Elena Zannoni2002-10-211-1/+31
| | | | | | | | | | | | | | | | | | Elena Zannoni <ezannoni@redhat.com> * symtab.h (address_class): Re-add LOC_THREAD_LOCAL_STATIC for thread local storage locations. (struct symbol): Add objfile field. (SYMBOL_OBJFILE): Define. * dwarf2read.c (is_thread_local): New static variable. (new_symbol): If variable is in thread local fill in address class and objfile appropriately. (decode_locdesc): Recognize and handle DW_OP_GNU_push_tls_address stack operation. * printcmd.c (address_info): Print the information for thread local storage variable. * findvar.c (read_var_value): In case of thread local variable, defer to the target vector code to compute address.
* Address class support.Kevin Buettner2002-10-161-7/+40
|
* 2002-10-08 Petr Sorfa <petrs@caldera.com>Jim Blandy2002-10-091-27/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Revised and re-submitted by John Wolfe <jlw@caldera.com> Move the Dwarf 2 abbrev table to a per-compilation-unit structure, so we can work on more than one compilation unit at a time. This helps prepare GDB to handle inter-CU die references. * dwarf2read.c (ABBREV_HASH_SIZE): moved definition forward in the code to be defined before struct comp_unit_head. (comp_unit_head): Added new members - offset, cu_head, begin_die, next and dwarf2_abbrevs. (dwarf2_abbrevs): Removed single static var; now member of struct comp_unit_head. dwarf2_build_psymtabs_hard): Complete new struct comp_unit_head members. (psymtab_to_symtab_1): Changed to work with the new struct comp_unit_head. (dwarf2_read_abbrevs): Now accepts a cu_header parameter and constructs the dwarf2_abbrevs[] inside the cu_header. (dwarf2_empty_abbrev_table): Now expects a ptr to a dwarf2_abbrev table to clean up. (dwarf2_lookup_abbrev): Now accepts a cu_header parameter and handling of dwarf2_abbrevs inside the cu_header. (read_partial_die): Now supports the call to the new dwarf2_lookup_abbrev. (read_full_die): Now supports the call to the new dwarf2_lookup_abbrev.
* 2002-10-01 Elena Zannoni <ezannoni@redhat.com>Elena Zannoni2002-10-011-0/+12
| | | | | * dwarf2read.c (dwarf_stack_op_name): Recognize more dwarf3 and GNU operators.
* 2002-09-03 David Carlton <carlton@math.stanford.edu>David Carlton2002-09-031-4/+7
| | | | | | * dwarf2read.c (dwarf2_add_member_fn): Add the 'type' argument (PR gdb/653). Update call to smash_to_method_type. (read_structure_scope): Update call to dwarf2_add_member_fn.
* 2002-08-13 David Carlton <carlton@math.stanford.edu>David Carlton2002-08-201-4/+8
| | | | | | | * dwarf2read.c (dwarf2_build_psymtabs): Check that dwarf_line_offset is nonzero before creating dwarf_line_buffer. (read_file_scope): Check that line_header is nonzero before decoding macro information.
* * dwarf2read.c (set_cu_language): Add handler for LANG_Ada95.Joel Brobecker2002-07-311-0/+1
| | | | | This does not change anything at the moment, but will be helpful later when full Ada support is integrated.
* * dwarf2read.c (read_initial_length): Handle older, non-standard,Kevin Buettner2002-07-161-4/+33
| | | | 64-bit DWARF2 format.
* 2002-07-12 Petr Sorfa <petrs@caldera.com>Petr Sorfa2002-07-121-9/+114
| | | | | | | | | | | | | | | | | | * dwarf2read.c (dwarf2_invalid_attrib_class): New complaint for invalid attribute class or form. (read_func_scope): DW_AT_frame_base better handling of DW_AT_block*. (dwarf2_add_member_fn): DW_AT_vtable_elem_location better handling of DW_AT_block*. (read_common_block): DW_AT_location better handling of DW_AT_block*. (read_partial_die): DW_AT_location better handling of DW_AT_block*. (new_symbol): DW_AT_external better handling of DW_AT_block*. Proper initialization of variable "addr". (attr_form_is_block): New function that returns true if the attribute's form is of DW_FORM_block*.
* * bcache.h: Update copyright.Andrew Cagney2002-07-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (struct bstring, struct bcache): Move definition to "bcache.c". Replaced by opaque declaration. (bcache_xfree): Replace free_bcache. (bcache_xmalloc, bcache_memory_used): Declare. * bcache.c: Update copyright. (struct bstring, struct bcache): Moved to here from "bcache.h". Update comments. (bcache_xmalloc, bcache_memory_used): New functions. (bcache_xfree): Replace function free_bcache. * Makefile.in (objfiles.o): Add $(bcache_h). (objfiles_h): Remove $(bcache_h). (symfile.o): Add $(bcache_h). * symmisc.c: Update copyright. (print_symbol_bcache_statistics): Pass psymbol_cache by value. (print_objfile_statistics): Use bcache_memory_used. * symfile.c: Include "bcache.h". (reread_symbols): Use bcache_xfree. (reread_symbols): Use bcache_xmalloc and bcache_xfree. (add_psymbol_to_list): Pass psymbol_cache by value. (add_psymbol_with_dem_name_to_list): Ditto. * objfiles.h: Update copyright. (struct bcache): Declare opaque. Do not include "bcache.h". (struct objfile): Change psymbol_cache and macro_cache to ``struct bcache'' pointers. * dwarf2read.c (macro_start_file): Pass macro_cache by value. * objfiles.c: Include "bcache.h". Update copyright. (allocate_objfile): Use bcache_xmalloc to create psymbol_cache and macro_cache. (free_objfile): Use bcache_xfree.
* Remove some vestiges of Harris 88k support.Jim Blandy2002-06-221-6/+0
| | | | | | | * dwarf2read.c (decode_locdesc): Remove `#if' block for Harris 88k register numbering quirk. * elfread.c (elf_symtab_read): Remove `#if' block for skipping odd symbols occurring in Harris 88k ELF targets.
* 2002-06-14 Daniel Jacobowitz <drow@mvista.com>Daniel Jacobowitz2002-06-141-19/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * gdbtypes.h (TYPE_FLAG_VARARGS): Update comment. (struct main_type): Remove arg_types member. Update comments for struct field. (TYPE_ARG_TYPES): Remove. (TYPE_FN_FIELD_ARGS): Update. (smash_to_method_type): Update prototype. * c-typeprint.c (cp_type_print_method_args): Take method type instead of argument list. Use new argument layout. Simplify. (c_type_print_args): Use new argument layout. Simplify. (c_type_print_base): Update call to cp_type_print_method_args. * dwarf2read.c (dwarf2_add_member_fn): Remove unneeded type argument; use die->type instead. Update call to smash_to_method_type. (read_structure_scope): Update call to dwarf2_add_member_fn. * gdbtypes.c (allocate_stub_method): Update comment. (smash_to_method_type): Take new NARGS and VARARGS arguments. Use new argument layout. (check_stub_method): Use new argument layout. Don't count void as an argument. (print_arg_types): Update comments. Use new argument layout. (recursive_dump_type): Don't print arg_types member. * hpread.c (hpread_read_struct_type): Use new argument layout. (fixup_class_method_type): Likewise. (hpread_type_lookup): Likewise. * stabsread.c (read_type): Update calls to read_args and smash_to_method_type. (read_args): Use new argument layout. Simplify. * valops.c (typecmp): Use new argument layout. Update parameters and comments. Simplify. (hand_function_call): Use new argument layout. (search_struct_method): Update call to typecmp. (find_overload_match): Use new argument layout.
* * dwarf2read.c (free_line_header): Use xfree, not free.Jim Blandy2002-05-241-4/+4
|
* Teach the Dwarf 2 reader to read macro information.Jim Blandy2002-05-161-2/+446
| | | | | | | | | | | | | | | | | | | | | * dwarf2read.c: #include "macrotab.h". (dwarf_macinfo_buffer): New variable. (struct dwarf2_pinfo): New members: dwarf_macinfo_buffer, and dwarf_macinfo_size. (DWARF_MACINFO_BUFFER, DWARF_MACINFO_SIZE): New macros. (dwarf2_missing_macinfo_section, dwarf2_macros_too_long, dwarf2_macros_not_terminated, dwarf2_macro_outside_file, dwarf2_macro_unmatched_end_file, dwarf2_macro_malformed_definition, dwarf2_macro_spaces_in_definition): New complaints. (dwarf2_has_info): Initialize dwarf_macinfo_offset. (dwarf2_build_psymtabs): Read the .dwarf_macinfo section. (dwarf2_build_psymtabs_hard): Record the buffer and its size in the partial symbol table. (psymtab_to_symtab_1): Set the macinfo buffer and size globals from what's recorded in the partial symbol table. (read_file_scope): If the compilation unit has a `DW_AT_macro_info' attribute, read its macro information. * Makefile.in (dwarf2read.o): Depend on macrotab.h.
* 2002-05-14 Daniel Jacobowitz <drow@mvista.com>Daniel Jacobowitz2002-05-141-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * gdbtypes.h: Update accessor macros to use TYPE_MAIN_TYPE. (TYPE_CONST, TYPE_VOLATILE, TYPE_CODE_SPACE, TYPE_DATA_SPACE): Use TYPE_INSTANCE_FLAGS. (struct main_type): New. (struct type): Move most members to struct main_type. Change cv_type and as_type to new type_chain member. Add instance_flags. (TYPE_MAIN_TYPE, TYPE_CHAIN, TYPE_INSTANCE_FLAGS): New macros. (TYPE_CV_TYPE, TYPE_AS_TYPE): Remove. (finish_cv_type): Remove prototype. * gdbtypes.c (alloc_type): Update comment. Allocate TYPE_MAIN_TYPE. Set TYPE_CHAIN. (alloc_type_instance): New function. (smash_type): New function. (make_pointer_type, make_reference_type, make_function_type) (smash_to_member_type, smash_to_method_type): Call smash_type. (make_qualified_type): New function. (make_type_with_address_space): Call make_qualified_type. (make_cv_type): Likewise. (finish_cv_type): Remove unnecessary function. (replace_type): Update comment. Copy TYPE_MAIN_TYPE. (recursive_dump_type): Dump TYPE_CHAIN and TYPE_INSTANCE_FLAGS; remove TYPE_CV_TYPE and TYPE_AS_TYPE. * c-typeprint.c (c_type_print_modifier): Use TYPE_INSTANCE_FLAGS. * dwarf2read.c (read_structure_scope): Don't call finish_cv_type. * hpread.c (hpread_read_struct_type): Likewise. * stabsread.c (read_struct_type): Likewise. 2002-05-14 Daniel Jacobowitz <drow@mvista.com> * gdb.base/maint.exp (maint print type): Update for new type structure.
* Properly track the size of the current objfile's .debug_line section.Jim Blandy2002-05-101-0/+7
| | | | | | | | | * dwarf2read.c (struct dwarf2_pinfo): New member: dwarf_line_size. (DWARF_LINE_SIZE): New macro. (dwarf2_build_psymtabs_hard): Record the line section's size in the partial symbol table. (psymtab_to_symtab_1): Restore dwarf_line_size from the partial symbol table.
* Separate the job of reading the line number info statement programJim Blandy2002-05-061-179/+310
| | | | | | | | | | | | | | | | | | | | | | | | | header (...expialidocious) out into its own function. * dwarf2read.c (struct line_head, struct filenames, struct directories): Replace with... (struct line_header): New structure, containing the full contents of the statement program header, including the include directory and file name tables. (read_file_scope): If we have line number info, instead of just calling dwarf_decode_lines to do all the work, call dwarf_decode_line_header first to get a `struct line_header' containing the data in the statement program header, and then pass that to dwarf_decode_lines, which will pick up where that left off. Be sure to clean up the `struct line_header' object. (dwarf_decode_line_header, free_line_header, add_include_dir, add_file_name): New functions. (dwarf_decode_lines): Move all the code to read the statement program header into dwarf_decode_line_header. Take the line header it built as the first argument, instead of the offset to the compilation unit's line number info. Use the new `struct line_header' type instead of the old structures. No need to do cleanups here now, since we don't allocate anything. (dwarf2_statement_list_fits_in_line_number_section, dwarf2_line_header_too_long): New complaints.
* 2002-04-24 Elena Zannoni <ezannoni@redhat.com>Elena Zannoni2002-04-261-0/+12
| | | | | | | | | * gdbtypes.h (TYPE_FLAG_VECTOR, TYPE_VECTOR): Define. * gdbtypes.c (recursive_dump_type): Output the vector flag. * dwarf2read.c (dwarf_attr_name): Handle new attribute for vectors. (read_array_type): Record the fact that this array type is really a vector (i.e. are passed in by value).
* 2002-04-04 Daniel Jacobowitz <drow@mvista.com>Daniel Jacobowitz2002-04-041-13/+105
| | | | | | | | | | | | * dwarf2read.c (struct function_range): New. (cu_first_fn, cu_last_fn, cu_cached_fn): New. (check_cu_functions): New. (read_file_scope): Initialize global function lists. Call dwarf_decode_line after processing children. (read_func_scope): Add to global function list. (dwarf_decode_lines): Call check_cu_functions everywhere record_line is called. Call record_line with a linenumber of 0 to mark sequence ends.
* 2002-03-20 Daniel Jacobowitz <drow@mvista.com>Daniel Jacobowitz2002-03-211-0/+12
| | | | | | | | | | Fix PR gdb/422. * c-lang.c (c_create_fundamental_type): Handle FT_COMPLEX, FT_DBL_PREC_COMPLEX, and FT_EXT_PREC_COMPLEX. * dwarf2read.c (read_base_type): Set TYPE_TARGET_TYPE for complex types. * stabsread.c (rs6000_builtin_type): Likewise. (read_sun_floating_type): Likewise.
* * dwarf2read.c (read_array_type): Accept DW_FORM_data8 asRichard Henderson2002-03-141-2/+4
| | | | a constant array bound.
* * dwarf2read.c (dwarf_cfi_name): Add new codes.Jason Merrill2002-02-281-0/+22
|
* 2002-02-14 Pierre Muller <muller@ics.u-strasbg.fr>Pierre Muller2002-02-151-13/+13
| | | | | * dwarf2read.c: Replace fprintf (stderr, ...) by fprintf_unfiltered (gdb_stderr, ...).
* 2002-01-20 Daniel Jacobowitz <drow@mvista.com>Daniel Jacobowitz2002-01-201-1/+1
| | | | | | | | | | | | | * buildsym.c: Update copyright years. * c-typeprint.c: Likewise. * dwarf2read.c: Likewise. * f-typeprint.c: Likewise. * gdbtypes.c: Likewise. * gdbtypes.h: Likewise. * hp-symtab-read.c: Likewise. * hpread.c: Likewise. * mdebugread.c: Likewise. * p-typeprint.c: Likewise.
* 2002-01-20 Daniel Jacobowitz <drow@mvista.com>Daniel Jacobowitz2002-01-201-0/+5
| | | | | | | | | * gdbtypes.h (struct cplus_struct_type): Add is_artificial to member function fields. Add accessor macro TYPE_FN_FIELD_ARTIFICIAL. * dwarf2read.c (dwarf2_add_member_fn): Check for artificial methods. * c-typeprint.c (c_type_print_base): Skip artificial member functions.
* 2002-01-15 Daniel Jacobowitz <drow@mvista.com>Daniel Jacobowitz2002-01-201-7/+0
| | | | | | | | | | | | | | | * gdbtypes.h (struct type): Fix whitespace. Remove obsolete comment. Add ``artificial'' to ``union field_location''. * dwarf2read.c: Remove ad-hoc TYPE_FIELD_ARTIFICIAL. * buildsym.c (finish_block): Initialize TYPE_FIELD_ARTIFICIAL to 0. * mdebugread.c (parse_symbol): Likewise. * stabsread.c (define_symbol): Likewise. * hp-symtab-read.c (hpread_function_type): Likewise, instead of initializing TYPE_FIELD_BITPOS to n (obsolete). (hpread_doc_function_type): Likewise. * hpread.c (hpread_function_type): Likewise.
* 1) Handling of the DW_AT_byte_size attribute when processing aPetr Sorfa2002-01-111-3/+22
| | | | | | | | | DW_TAG_string_type (this is acceptable under the current DWARF 2.1/3.0 standard.) 2) In read_tag_string_type(), a fix for FORTRAN that propagates the first string length to all string types. This is important as FORTRAN strings are not delimited as in C/C++. 3) Handling of the DW_LANG_Fortran95.
* * dwarf2read.c (decode_locdesc): Implement DW_OP_litn, DW_OP_dup.Jason Merrill2002-01-111-1/+41
| | | | Fix DW_OP_minus.
* Approved by Jim Blandy:Fred Fish2001-12-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | 2001-12-11 Fred Fish <fnf@redhat.com> * c-typeprint.c (c_type_print_base): Use type flags access macros to test bits. * ch-typeprint.c (chill_type_print_base): Ditto. * ch-valprint.c (chill_val_print): Ditto. * d10v-tdep.c (d10v_pointer_to_address): Ditto. * dwarf2read.c (dwarf2_add_member_fn): Ditto. * dwarfread.c (read_structure_scope): Ditto. * gdbtypes.c (create_range_type): Dittol (create_set_type): Ditto. (check_typedef): Ditto. * jv-typeprint.c (java_type_print_base): Ditto. * p-typeprint.c (pascal_type_print_base): Ditto * p-valprint.c (pascal_val_print): Ditto. * stabsread.c (read_cfront_member_functions): Ditto. (read_member_functions): Ditto. (cleanup_undefined_types): Ditto. * valprint.c (val_print): Ditto. * valops.c (hand_function_call): Remove is_prototyped variable and just use type flag test macro directly.
* Approved by Elena Zannoni:Fred Fish2001-12-091-15/+7
| | | | | | | 2001-12-08 Fred Fish <fnf@redhat.com> * dwarf2read.c (read_typedef): Replace hand crafted type initialization with a call to the init_type() function, which is how the rest of gdb creates types.
OpenPOWER on IntegriCloud