summaryrefslogtreecommitdiff
path: root/gdb/stabsread.c
Commit message (Collapse)AuthorAgeFilesLines
* Code cleanup: Add objfile_name accessorJan Kratochvil2013-09-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | gdb/ 2013-09-24 Jan Kratochvil <jan.kratochvil@redhat.com> Code cleanup: Add objfile_name accessor function. * ada-lang.c (is_known_support_routine): Use objfile_name. * auto-load.c (source_gdb_script_for_objfile) (auto_load_objfile_script): Likewise. * coffread.c (coff_symtab_read, read_one_sym): Likewise. * dbxread.c (dbx_symfile_read): Likewise. * dwarf2-frame.c (dwarf2_build_frame_info): Likewise. * dwarf2loc.c (locexpr_describe_location_piece): Likewise. * dwarf2read.c (dwarf2_get_dwz_file, dwarf2_read_index) (dw2_symtab_iter_next, dw2_expand_symtabs_matching) (lookup_dwp_signatured_type, lookup_dwo_unit) (dwarf2_build_psymtabs_hard, scan_partial_symbols, process_queue) (fixup_go_packaging, process_imported_unit_die, dwarf2_physname) (read_import_statement, create_dwo_cu, open_and_init_dwp_file) (lookup_dwo_cutu, read_call_site_scope, dwarf2_ranges_read) (dwarf2_record_block_ranges, read_common_block, read_typedef) (read_subrange_type, load_partial_dies, read_partial_die) (read_addr_index_1, read_str_index, dwarf_decode_lines_1) (die_containing_type, build_error_marker_type, lookup_die_type) (follow_die_ref_or_sig, follow_die_ref, dwarf2_fetch_die_loc_sect_off) (dwarf2_fetch_constant_bytes, follow_die_sig, get_signatured_type) (get_DW_AT_signature_type, write_psymtabs_to_index) (save_gdb_index_command): Likewise. * elfread.c (find_separate_debug_file_by_buildid, elf_symfile_read): Likewise. * expprint.c (dump_subexp_body_standard): Likewise. * gdbtypes.c (type_name_no_tag_or_error): Likewise. * jit.c (jit_object_close_impl): Use the objfile field name renamed to original_name. * linux-thread-db.c (try_thread_db_load_from_pdir_1): New variable obj_name, use objfile_name for it, use the variable. (try_thread_db_load_from_pdir, has_libpthread, thread_db_new_objfile): Use objfile_name. * machoread.c (macho_symtab_read, macho_check_dsym) (macho_symfile_relocate): Likewise. * maint.c (maintenance_translate_address): Likewise. * minidebug.c (find_separate_debug_file_in_section): Likewise. * minsyms.c (install_minimal_symbols): Likewise. * objfiles.c (allocate_objfile): Use the objfile field name renamed to original_name. (filter_overlapping_sections): Use objfile_name. (objfile_name): New function. * objfiles.h (struct objfile): Rename field name to original_name. (objfile_name): New prototype. * printcmd.c (sym_info, address_info): Use objfile_name. * probe.c (parse_probes, collect_probes, compare_probes) (info_probes_for_ops): Likewise. * progspace.c (clone_program_space): Likewise. * psymtab.c (require_partial_symbols, dump_psymtab, allocate_psymtab) (maintenance_info_psymtabs): Likewise. * python/py-auto-load.c (gdbpy_load_auto_script_for_objfile) (source_section_scripts): Likewise. * python/py-objfile.c (objfpy_get_filename): Likewise. * python/py-progspace.c (pspy_get_filename): Likewise. * solib-aix.c (solib_aix_get_toc_value): Likewise. * solib-som.c (match_main, som_solib_section_offsets): Likewise. * solib.c (solib_read_symbols): Likewise. * stabsread.c (scan_file_globals): Likewise. * stap-probe.c (handle_stap_probe): Likewise. * symfile.c (symbol_file_clear, separate_debug_file_exists) (find_separate_debug_file_by_debuglink): Likewise. (reread_symbols): Likewise. Use the objfile field name renamed to original_name. (allocate_symtab): Use objfile_name. * symmisc.c (print_symbol_bcache_statistics, print_objfile_statistics) (dump_objfile, dump_msymbols, dump_symtab_1) (maintenance_print_msymbols, maintenance_print_objfiles) (maintenance_info_symtabs, maintenance_check_symtabs): Likewise. * target.c (target_translate_tls_address, target_info): Likewise. * xcoffread.c (xcoff_initial_scan): Make variable name const. Use objfile_name.
* * buildsym.c (subfile_stack): Move here from buildsym.h.Doug Evans2013-08-201-0/+17
| | | | | | | | | | | | | | | | | (pending_macros): Ditto. (get_macro_table): New function. (buildsym_init): Initialize subfile_stack. * coffread.c (type_vector,type_vector_length): Moved here from buildsym.h. (INITIAL_TYPE_VECTOR_LENGTH): Ditto. (coff_symtab_read): Use it. * dbxread.c (read_ofile_symtab): Delete init of subfile_stack. * dwarf2read.c (macro_start_file): Replace uses of pending_macros with call to get_macro_table. * stabsread.c (type_vector,type_vector_length): Moved here from buildsym.h. (INITIAL_TYPE_VECTOR_LENGTH): Ditto. * buildsym.h (get_macro_table): Declare.
* fix one bug in stabsread.cTom Tromey2013-05-301-1/+4
| | | | | | | Some code in stabsread.c can return without running cleanups. * stabsread.c (read_struct_type): Call do_cleanups along all return paths.
* PR symtab/8424:Tom Tromey2013-04-081-13/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * blockframe.c (find_pc_partial_function_gnu_ifunc): Check SYMBOL_SECTION, not SYMBOL_OBJ_SECTION. * breakpoint.c (resolve_sal_pc): Update. * elfread.c (elf_gnu_ifunc_record_cache): Update. * findvar.c (struct minsym_lookup_data) <objfile>: New field. (minsym_lookup_iterator_cb): Use it. (default_read_var_value): Update. * hppa-hpux-tdep.c (hppa64_hpux_in_solib_call_trampoline): Update. * infcmd.c (jump_command): Update. * linespec.c (minsym_found): Update. * maint.c (maintenance_translate_address): Update. * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Update. (prim_record_minimal_symbol_full): Don't set SYMBOL_OBJ_SECTION. * parse.c (write_exp_msymbol): Update. * printcmd.c (address_info): Update. * psymtab.c (find_pc_sect_psymbol): Update. (fixup_psymbol_section): Check SYMBOL_SECTION, not SYMBOL_OBJ_SECTION. (add_psymbol_to_bcache): Correctly initialize SYMBOL_SECTION. Don't initialize SYMBOL_OBJ_SECTION. * spu-tdep.c (spu_catch_start): Update. * stabsread.c (define_symbol): Don't set SYMBOL_SECTION. * symmisc.c (dump_msymbols, print_symbol): Update. * symtab.c (fixup_section): Don't set 'obj_section'. Change how fallback section is computed. (fixup_symbol_section): Update. (find_pc_sect_symtab, find_function_start_sal, skip_prologue_sal): Update. (allocate_symbol, initialize_symbol, allocate_template_symbol): Initialize SYMBOL_SECTION. * symtab.h (struct general_symbol_info) <section>: Update comment. <obj_section>: Remove. (SYMBOL_OBJ_SECTION): Add 'objfile' argument. Rewrite. (SYMBOL_OBJFILE): New macro.
* * ada-lang.c (ada_decode_symbol): Check and set 'ada_mangled'.Tom Tromey2013-04-081-2/+4
| | | | | | | | | | | | | | | | | | | | | | | Use symbol's obstack, not an objfile. * coffread.c (process_coff_symbol): Update. * dwarf2read.c (fixup_go_packaging, new_symbol_full): Update. * jv-lang.c (add_class_symbol): Update. * mdebugread.c (new_symbol): Update. * minsyms.c (prim_record_minimal_symbol_full) (terminate_minimal_symbol_table): Update. * psymtab.c (add_psymbol_to_bcache): Clear entire symbol. Update. * stabsread.c (define_symbol, read_enum_type): Update. * symtab.c (symbol_set_demangled_name, symbol_get_demangled_name): Handle Ada specially. (symbol_set_language): Add 'obstack' argument. (symbol_set_names): Update. (symbol_natural_name, symbol_demangled_name): Always use ada_decode_symbol. * symtab.h (struct general_symbol_info) <language_specific::obstack>: New field. <ada_mangled>: New field. (SYMBOL_SET_LANGUAGE): Add 'obstack' argument. (symbol_set_language): Update.
* * coffread.c (process_coff_symbol, coff_read_enum_type): CallTom Tromey2013-04-081-18/+6
| | | | | | | | | | | | | | | | | allocate_symbol. * dwarf2read.c (fixup_go_packaging): Call allocate_symbol. (read_func_scope): Call allocate_template_symbol. (new_symbol_full): Call allocate_symbol. * jit.c (finalize_symtab): Call allocate_symbol. * jv-lang.c (add_class_symbol): Call allocate_symbol. * mdebugread.c (parse_symbol, new_block): Call allocate_symbol. * stabsread.c (patch_block_stabs, define_symbol, read_enum_type) (common_block_end): Call allocate_symbol. * symtab.c (allocate_symbol, initialize_symbol) (allocate_template_symbol): New functions. * symtab.c (allocate_symbol, initialize_symbol) (allocate_template_symbol): Declare. * xcoffread.c (process_xcoff_symbol): Call initialize_symbol.
* 2013-03-20 Jan Kratochvil <jan.kratochvil@redhat.com>Tom Tromey2013-03-201-38/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tom Tromey <tromey@redhat.com> PR symtab/8421: * coffread.c (coff_register_index): New global. (process_coff_symbol, coff_read_enum_type): Set SYMBOL_ACLASS_INDEX. (_initialize_coffread): Initialize new global. * dwarf2loc.c (locexpr_find_frame_base_location) (dwarf2_block_frame_base_locexpr_funcs) (loclist_find_frame_base_location) (dwarf2_block_frame_base_loclist_funcs): New. (dwarf_expr_frame_base_1): Call SYMBOL_BLOCK_OPS, remove internal_error. (dwarf2_locexpr_funcs, dwarf2_loclist_funcs): Add location_has_loclist. * dwarf2loc.h (dwarf2_block_frame_base_locexpr_funcs) (dwarf2_block_frame_base_loclist_funcs): New. * dwarf2read.c (dwarf2_locexpr_index, dwarf2_loclist_index) (dwarf2_locexpr_block_index, dwarf2_loclist_block_index): New globals. (read_func_scope): Update. (fixup_go_packaging, mark_common_block_symbol_computed) (var_decode_location, new_symbol_full, dwarf2_const_value): Set SYMBOL_ACLASS_INDEX. (dwarf2_symbol_mark_computed): Likewise. Add 'is_block' argument. (_initialize_dwarf2_read): Initialize new globals. * jit.c (finalize_symtab): Set SYMBOL_ACLASS_INDEX. * jv-lang.c (add_class_symbol): Set SYMBOL_ACLASS_INDEX. * mdebugread.c (mdebug_register_index, mdebug_regparm_index): New globals. (parse_symbol, psymtab_to_symtab_1): Set SYMBOL_ACLASS_INDEX. (_initialize_mdebugread): Initialize new globals. * psympriv.h (struct partial_symbol) <aclass>: Update comment. * stabsread.c (patch_block_stabs): Set SYMBOL_ACLASS_INDEX. (stab_register_index, stab_regparm_index): New globals. (define_symbol, read_enum_type, common_block_end): Set SYMBOL_ACLASS_INDEX. (_initialize_stabsread): Initialize new globals. * symtab.c (next_aclass_value, symbol_impl, symbol_impls): New globals. (MAX_SYMBOL_IMPLS): New define. (register_symbol_computed_impl, register_symbol_block_impl) (register_symbol_register_impl) (initialize_ordinary_address_classes): New functions. (_initialize_symtab): Call initialize_ordinary_address_classes. * symtab.h (enum address_class) <LOC_FINAL_VALUE>: New constant. (struct symbol_impl): New. (SYMBOL_ACLASS_BITS): New define. (struct symbol) <aclass, ops>: Remove fields. <aclass_index>: New field. (symbol_impls): Declare. (SYMBOL_CLASS, SYMBOL_COMPUTED_OPS, SYMBOL_REGISTER_OPS): Redefine. (SYMBOL_IMPL, SYMBOL_ACLASS_INDEX): New defines. (register_symbol_computed_impl, register_symbol_block_impl) (register_symbol_register_impl): Declare. (struct symbol_computed_ops): Add location_has_loclist. (struct symbol_block_ops): New. (SYMBOL_BLOCK_OPS): New. * xcoffread.c (process_xcoff_symbol): Set SYMBOL_ACLASS_INDEX.
* * symfile.h (obsavestring): Don't declare.Tom Tromey2013-01-211-10/+10
| | | | | | | | | | | | | | | * symfile.c (obsavestring): Remove. * ada-exp.y: Use obstack_copy0, not obsavestring. * ada-lang.c: Use obstack_copy0, not obsavestring. * coffread.c: Use obstack_copy0, not obsavestring. * cp-namespace.c: Use obstack_copy0, not obsavestring. * dbxread.c: Use obstack_copy0, not obsavestring. * dwarf2read.c: Use obstack_copy0, not obsavestring. * jit.c: Use obstack_copy0, not obsavestring. * mdebugread.c: Use obstack_copy0, not obsavestring. * psymtab.c: Use obstack_copy0, not obsavestring. * stabsread.c: Use obstack_copy0, not obsavestring. * xcoffread.c: Use obstack_copy0, not obsavestring.
* Update years in copyright notice for the GDB files.Joel Brobecker2013-01-011-1/+1
| | | | | | | Two modifications: 1. The addition of 2013 to the copyright year range for every file; 2. The use of a single year range, instead of potentially multiple year ranges, as approved by the FSF.
* gdb/qiyao2012-08-161-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * gdbtypes.h (enum type_code): Define TYPE_CODE_BITSTRING -1. * arm-tdep.c (arm_type_align): Remove code handling TYPE_CODE_BITSTRING. * c-typeprint.c (c_type_print_varspec_prefix): Likewise. (c_type_print_varspec_suffix): Likewise. * eval.c (evaluate_subexp_standard): Likewise. * f-typeprint.c (f_type_print_varspec_prefix): Likewise. (f_type_print_varspec_suffix): Likewise. * gdbtypes.c (is_scalar_type): Likewise. (recursive_dump_type): Likewise. * infcall.c (value_arg_coerce): Likewise. * m2-valprint.c (m2_val_print): Likewise. * p-typeprint.c (pascal_type_print_varspec_prefix): Likewise. (pascal_type_print_varspec_suffix): Likewise. (pascal_type_print_base): Likewise. * p-valprint.c (pascal_val_print): Likewise. (pascal_val_print): Likewise. * valops.c (value_slice): Likewise. * valprint.c (scalar_type_p): Likewise. * valarith.c (value_bitstring_subscript): Remove. (value_concat): Remove code handling TYPE_CODE_BITSTRING. Remove comment on TYPE_CODE_BITSTRING. * stabsread.c (read_type): Don't set TYPE_CODE (type) to TYPE_CODE_BITSTRING. * python/py-type.c (pyty_codes): Move ENTRY (TYPE_CODE_BITSTRING) to slot 0. gdb/doc: * gdb.texinfo (Types In Python): Mention gdb.TYPE_CODE_BITSTRING is deprecated.
* * stabsread.h (cleanup_undefined_stabs_types): Renamed fromDoug Evans2012-05-291-1/+1
| | | | | | cleanup_undefined_types. * stabsread.c (cleanup_undefined_stabs_types): Ditto. All callers updated.
* gdb/Jan Kratochvil2012-04-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PR symtab/7259: * ada-exp.y (convert_char_literal): Use TYPE_FIELD_ENUMVAL. * ada-lang.c (ada_discrete_type_high_bound) (ada_discrete_type_low_bound): Use TYPE_FIELD_ENUMVAL for TYPE_CODE_ENUM. (ada_identical_enum_types_p): Use TYPE_FIELD_ENUMVAL. (pos_atr, value_val_atr): Use TYPE_FIELD_ENUMVAL for TYPE_CODE_ENUM. * ada-typeprint.c (print_enum_type): Change variable lastval to LONGEST. Use TYPE_FIELD_ENUMVAL. * ada-valprint.c (print_optional_low_bound, ada_print_scalar) (ada_val_print_1): Use TYPE_FIELD_ENUMVAL for TYPE_CODE_ENUM. * c-typeprint.c (c_type_print_base): Move variable lastval to inner block, change it to LONGEST. Use TYPE_FIELD_ENUMVAL for TYPE_CODE_ENUM. * coffread.c (coff_read_enum_type): Use SET_FIELD_ENUMVAL. * dwarf2read.c (process_enumeration_scope): Likewise. * gdb-gdb.py (TypeFlagsPrinter): Use field.enumval instead of field.bitpos. (class StructMainTypePrettyPrinter): Support also FIELD_LOC_KIND_ENUMVAL. * gdbtypes.c (get_discrete_bounds): Use TYPE_FIELD_ENUMVAL for TYPE_CODE_ENUM. (recursive_dump_type): Use TYPE_FIELD_ENUMVAL for TYPE_CODE_ENUM. (copy_type_recursive): Support also FIELD_LOC_KIND_ENUMVAL. * gdbtypes.h (enum field_loc_kind): New FIELD_LOC_KIND_ENUMVAL. (struct main_type.flds_bnds.fields.loc): Adjust bitpos comment. New field enumval. (struct main_type.flds_bnds.bields): Adjust loc_kind and bitsize to accommodate enumval. (struct call_site): Adjust loc_kind to accommodate enumval. (FIELD_ENUMVAL, FIELD_ENUMVAL_LVAL, SET_FIELD_ENUMVAL) (TYPE_FIELD_ENUMVAL): New macros. * m2-typeprint.c (m2_enum): Use TYPE_FIELD_ENUMVAL. * mdebugread.c (parse_symbol): Use TYPE_FIELD_ENUMVAL for TYPE_CODE_ENUM. * p-typeprint.c (pascal_type_print_base): Likewise. * python/lib/gdb/printing.py (class FlagEnumerationPrinter): Use enumval. * python/lib/gdb/types.py (make_enum_dict): Likewise. * python/py-type.c (convert_field): New variable addrstring. Use TYPE_FIELD_ENUMVAL for TYPE_CODE_ENUM. (check_types_equal): Support also FIELD_LOC_KIND_ENUMVAL. * stabsread.c (read_enum_type): Use SET_FIELD_ENUMVAL. * typepint.c (print_type_scalar): Use TYPE_FIELD_ENUMVAL for TYPE_CODE_ENUM. * valprint.c (generic_val_print): Likewise. gdb/testsuite/ PR symtab/7259: * gdb.base/enumval.c: New test case. * gdb.base/enumval.exp: New test case. * gdb.python/py-type.exp (test_enums): Use field.enumval instead of field.bitpos.
* 2012-04-17 Pedro Alves <palves@redhat.com>Pedro Alves2012-04-171-4/+5
| | | | | | | | | | | | | | | | * gdbtypes.h (FIELD_BITPOS): Rename to ... (FIELD_BITPOS_LVAL): ... this. (FIELD_BITPOS): New. (SET_FIELD_BITPOS): Adjust to use FIELD_BITPOS_LVAL. * dwarf2read.c (dwarf2_add_field): Use SET_FIELD_BITPOS. * gdbtypes.c (append_composite_type_field_aligned): Adjust to use SET_FIELD_BITPOS. * gnu-v3-abi.c (build_gdb_vtable_type): Adjust to use SET_FIELD_BITPOS. * stabsread.c (read_cpp_abbrev, read_one_struct_field) (read_baseclasses): Adjust to use SET_FIELD_BITPOS. * target-descriptions.c (tdesc_gdb_type): Adjust to use SET_FIELD_BITPOS.
* gdb/Jan Kratochvil2012-04-171-1/+1
| | | | | | | | | Do not rely on FIELD_LOC_KIND_BITPOS being zero. * ada-lang.c (ada_template_to_fixed_record_type_1): Replace TYPE_FIELD_BITPOS used as lvalue by SET_FIELD_BITPOS. * gdbtypes.c (append_flags_type_flag): Likewise, twice. * jv-lang.c (java_link_class_type): Likewise, once. * stabsread.c (read_enum_type): Likewise.
* [stabs] The address of Fortran common blocks may be > INT_MAX.Joel Brobecker2012-03-131-2/+2
| | | | | | | | gdb/ 2012-03-08 Chris January <chris.january@allinea.com> * stabsread.c (fix_common_block): Change type of valu argument to CORE_ADDR.
* * gdbtypes.h (struct main_type): Change type of name,tag_name,Doug Evans2012-02-071-21/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | and fields.name members from char * to const char *. All uses updated. (struct cplus_struct_type): Change type of fn_fieldlists.name member from char * to const char *. All uses updated. (type_name_no_tag): Update. (lookup_unsigned_typename, lookup_signed_typename): Update. * gdbtypes.c (type_name_no_tag): Change result type from char * to const char *. All callers updated. (lookup_unsigned_typename, lookup_signed_typename): Change type of name parameter from char * to const char *. * symtab.h (struct cplus_specific): Change type of demangled_name member from char * to const char *. All uses updated. (struct general_symbol_info): Change type of name and mangled_lang.demangled_name members from char * to const char *. All uses updated. (symbol_get_demangled_name, symbol_natural_name): Update. (symbol_demangled_name, symbol_search_name): Update. * symtab.c (symbol_get_demangled_name): Change result type from char * to const char *. All callers updated. (symbol_natural_name, symbol_demangled_name): Ditto. (symbol_search_name): Ditto. (completion_list_add_name): Change type of symname,sym_text, text,word parameters from char * to const char *. (completion_list_objc_symbol): Change type of sym_text, text,word parameters from char * to const char *. * ada-lang.c (find_struct_field): Change type of name parameter from char * to const char *. (encoded_ordered_before): Similarly for N0,N1 parameters. (old_renaming_is_invisible): Similarly for function_name parameter. (ada_type_name): Change result type from char * to const char *. All callers updated. * ada-lang.h (ada_type_name): Update. * buildsym.c (hashname): Change type of name parameter from char * to const char *. * buildsym.h (hashname): Update. * dbxread.c (end_psymtab): Change type of include_list parameter from char ** to const char **. * dwarf2read.c (determine_prefix): Change result type from char * to const char *. All callers updated. * f-lang.c (find_common_for_function): Change type of name, funcname parameters from char * to const char *. * f-lang.c (find_common_for_function): Update. * f-valprint.c (list_all_visible_commons): Change type of funcname parameters from char * to const char *. * gdbarch.sh (static_transform_name): Change type of name parameter and result from char * to const char *. * gdbarch.c: Regenerate. * gdbarch.h: Regenerate. * i386-sol2-tdep.c (i386_sol2_static_transform_name): Change type of name parameter from char * to const char *. * jv-lang.c (java_primitive_type_from_name): Ditto. (java_demangled_signature_length): Similarly for signature parameter. (java_demangled_signature_copy): Ditto. (java_demangle_type_signature): Ditto. * jv-lang.h (java_primitive_type_from_name): Update. (java_demangle_type_signature): Update. * objc-lang.c (specialcmp): Change type of a,b parameters from char * to const char *. * p-lang.c (is_pascal_string_type): Change type of arrayname parameter from char * to const char *. All callers updated. * p-lang.h (is_pascal_string_type): Update. * solib-frv.c (find_canonical_descriptor_in_load_object): Change type of name parameter from char * to const char *. * sparc-sol2-tdep.c (sparc_sol2_static_transform_name): Ditto. * utils.c (fprintf_symbol_filtered): Ditto. * defs.h (fprintf_symbol_filtered): Update. * sparc-tdep.h (sparc_sol2_static_transform_name): Update. * stabsread.h (end_psymtab): Update. * stack.c (find_frame_funname): Change type of funname parameter from char ** to const char **. * stack.h (find_frame_funname): Update. * typeprint.c (type_print): Change type of varstring parameter from char * to const char *. * value.h (type_print): Update. * xcoffread.c (xcoff_start_psymtab): Change type of filename parameter from char * to const char *. All callers updated. (xcoff_end_psymtab): Change type of include_list parameter from char ** to const char **. All callers updated. (swap_sym): Similarly for name parameter. All callers updated. * coffread.c (patch_type): Add (char*) cast to xfree parameter. Use xstrdup. (process_coff_symbol): Use xstrdup. * stabsread.c (stabs_method_name_from_physname): Renamed from update_method_name_from_physname. Change result type from void to char *. All callers updated. (read_member_functions): In has_destructor case, store name in objfile obstack instead of malloc space. In !has_stub case, fix mem leak.
* * gdbtypes.h (struct cplus_struct_type): Delete memberDoug Evans2012-01-081-7/+0
| | | | nfn_fields_total. All uses removed.
* Copyright year update in most files of the GDB Project.Joel Brobecker2012-01-041-3/+1
| | | | | | gdb/ChangeLog: Copyright year update in most files of the GDB Project.
* * defs.h (is_cplus_marker, set_demangling_style): Moved to ...Doug Evans2011-11-101-0/+1
| | | | | | | | | | | | | | | | | | | | | | * gdb-demangle.h: ... here. New file. * demangle.c: #include "gdb-demangle.h". (_initialize_demangler): Use initialize_file_ftype for prototype. Move "set demangle" and "set asm-demangle" parameters here from utils.c (demangle, show_demangle, asm_demangle, show_asm_demangle): Move here from utils.c * utils.c: Update. #include "gdb-demangle.h". * symtab.h (asm_demangle): Delete. (demangle): Move declaration next to use. * breakpoint.c: #include "gdb-demangle.h" instead of "demangle.h". * dwarf2read.c: #include "gdb-demangle.h". * gnu-v2-abi.c: Ditto. * jv-typeprint.c: Ditto. * mdebugread.c: Ditto. * p-typeprint.c: Ditto. * stabsread.c: Ditto. * printcmd.c: Ditto. (asm_demangle): Delete declaration. * tui/tui-stack.c: #include "gdb-demangle.h".
* * cp-namespace.c (cp_scan_for_anonymous_namespaces): Changed functionAleksandar Ristovski2011-10-201-1/+1
| | | | | | | | | | | arguments by adding OBJFILE. Instead of getting objfile from symbol's symtab, use new argument OBJFILE. * cp-support.h (cp_scan_for_anonymous_namespaces): Changed function arguments by adding OBJFILE. * gdb/dwarf2read.c (new_symbol_full): Change call to cp_scan_for_anonymous_namespaces to match new signature. * gdb/stabsread.c (define_symbol): Change call to cp_scan_for_anonymous_namespaces to match new signature.
* * value.c (value_fn_field): Constify.Tom Tromey2011-05-181-1/+1
| | | | | | | | | | | | | | | | | | * symtab.c (gdb_mangle_name): Constify. * stabsread.c (update_method_name_from_physname): Make 'physname' argument const. * p-typeprint.c (pascal_type_print_method_args): Make arguments const. Use explicit fputc_filtered loop. (pascal_type_print_base): Constify. * p-lang.h (pascal_type_print_method_args): Update. * linespec.c (add_matching_methods): Constify. (add_constructors): Likewise. * jv-typeprint.c (java_type_print_base): Constify. * gdbtypes.h (struct cplus_struct_type) <fn_fieldlist.fn_field.physname>: Now const. * dwarf2read.c (compute_delayed_physnames): Constify. (dwarf2_add_member_fn): Likewise. * c-typeprint.c (c_type_print_base): Constify. Use cleanups.
* 2011-03-04 Michael Snyder <msnyder@vmware.com>Michael Snyder2011-03-151-0/+6
| | | | * stabsread.c (define_symbol): Guard against bad stabstring input.
* 2011-02-28 Michael Snyder <msnyder@vmware.com>Michael Snyder2011-02-281-0/+1
| | | | * stabsread.c (rs6000_builtin_type): Missing break statement.
* 2011-02-25 Michael Snyder <msnyder@vmware.com>Michael Snyder2011-02-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * arm-tdep.c: Fix typos in comments. * bsd-uthread.c: Ditto. * completer.c: Ditto. * corelow.c: Ditto. * cp-namespace.c: Ditto. * cp-support.c: Ditto. * cris-tdep.c: Ditto. * dbxread.c: Ditto. * dwarf2read.c: Ditto. * frame.h: Ditto. * gdbtypes.h: Ditto. * inferior.h: Ditto. * mdebugread.c: Ditto. * mips-tdep.c: Ditto. * ppc-linux-nat.c: Ditto. * ppc-linux-tdep.c: Ditto. * printcmd.c: Ditto. * sol-thread.c: Ditto. * solib-frv.c: Ditto. * solist.h: Ditto. * sparc64-tdep.c: Ditto. * spu-tdep.c: Ditto. * stabsread.c: Ditto. * symfile.c: Ditto. * valops.c: Ditto. * varobj.c: Ditto. * vax-nat.c: Ditto. * python/py-block.c: Ditto. * python/py-symbol.c: Ditto. * python/py-symtab.c: Ditto. * python/py-value.c: Ditto. * tui/tui-win.c: Ditto.
* 2011-01-11 Michael Snyder <msnyder@vmware.com>Michael Snyder2011-01-111-95/+98
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * s390-tdep.c: Comment cleanup, mostly periods and spaces. * score-tdep.c: Ditto. * score-tdep.h: Ditto. * ser-base.c: Ditto. * ser-go32.c: Ditto. * serial.c: Ditto. * serial.h: Ditto. * ser-mingw.c: Ditto. * ser-pipe.c: Ditto. * ser-tcp.c: Ditto. * ser-unix.c: Ditto. * sh64-tdep.c: Ditto. * shnbsd-nat.c: Ditto. * sh-tdep.c: Ditto. * sh-tdep.h: Ditto. * solib.c: Ditto. * solib-darwin.c: Ditto. * solib-frv.c: Ditto. * solib.h: Ditto. * solib-irix.c: Ditto. * solib-osf.c: Ditto. * solib-pa64.c: Ditto. * solib-som.c: Ditto. * solib-spu.c: Ditto. * solib-sunos.c: Ditto. * solib-svr4.c: Ditto. * solist.h: Ditto. * sol-thread.c: Ditto. * somread.c: Ditto. * source.c: Ditto. * source.h: Ditto. * sparc64-linux-tdep.c: Ditto. * sparc64-tdep.c: Ditto. * sparc-linux-nat.c: Ditto. * sparc-linux-tdep.c: Ditto. * sparc-sol2-nat.c: Ditto. * sparc-sol2-tdep.c: Ditto. * sparc-tdep.c: Ditto. * sparc-tdep.h: Ditto. * spu-tdep.c: Ditto. * stabsread.c: Ditto. * stabsread.h: Ditto. * stack.c: Ditto. * symfile.c: Ditto. * symfile.h: Ditto. * symmisc.c: Ditto. * symtab.c: Ditto. * symtab.h: Ditto. * target.c: Ditto. * target-descriptions.c: Ditto. * target-descriptions.h: Ditto. * target.h: Ditto. * target-memory.c: Ditto. * terminal.h: Ditto. * thread.c: Ditto. * top.c: Ditto. * tracepoint.c: Ditto. * tracepoint.h: Ditto. * trad-frame.h: Ditto. * typeprint.c: Ditto.
* 2011-01-05 Michael Snyder <msnyder@vmware.com>Michael Snyder2011-01-051-34/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * addrmap.c: Shorten lines of >= 80 columns. * arch-utils.c: Ditto. * arch-utils.h: Ditto. * ax-gdb.c: Ditto. * ax-general.c: Ditto. * bcache.c: Ditto. * blockframe.c: Ditto. * breakpoint.c: Ditto. * buildsym.c: Ditto. * c-lang.c: Ditto. * c-typeprint.c: Ditto. * charset.c: Ditto. * coffread.c: Ditto. * command.h: Ditto. * corelow.c: Ditto. * cp-abi.c: Ditto. * cp-namespace.c: Ditto. * cp-support.c: Ditto. * dbug-rom.c: Ditto. * dbxread.c: Ditto. * defs.h: Ditto. * dfp.c: Ditto. * dfp.h: Ditto. * dictionary.c: Ditto. * disasm.c: Ditto. * doublest.c: Ditto. * dwarf2-frame.c: Ditto. * dwarf2expr.c: Ditto. * dwarf2loc.c: Ditto. * dwarf2read.c: Ditto. * elfread.c: Ditto. * eval.c: Ditto. * event-loop.c: Ditto. * event-loop.h: Ditto. * exceptions.h: Ditto. * exec.c: Ditto. * expprint.c: Ditto. * expression.h: Ditto. * f-lang.c: Ditto. * f-valprint.c: Ditto. * findcmd.c: Ditto. * frame-base.c: Ditto. * frame-unwind.c: Ditto. * frame-unwind.h: Ditto. * frame.c: Ditto. * frame.h: Ditto. * gcore.c: Ditto. * gdb-stabs.h: Ditto. * gdb_assert.h: Ditto. * gdb_dirent.h: Ditto. * gdb_obstack.h: Ditto. * gdbcore.h: Ditto. * gdbtypes.c: Ditto. * gdbtypes.h: Ditto. * inf-ttrace.c: Ditto. * infcall.c: Ditto. * infcmd.c: Ditto. * inflow.c: Ditto. * infrun.c: Ditto. * inline-frame.h: Ditto. * language.c: Ditto. * language.h: Ditto. * libunwind-frame.c: Ditto. * libunwind-frame.h: Ditto. * linespec.c: Ditto. * linux-nat.c: Ditto. * linux-nat.h: Ditto. * linux-thread-db.c: Ditto. * machoread.c: Ditto. * macroexp.c: Ditto. * macrotab.c: Ditto. * main.c: Ditto. * maint.c: Ditto. * mdebugread.c: Ditto. * memattr.c: Ditto. * minsyms.c: Ditto. * monitor.c: Ditto. * monitor.h: Ditto. * objfiles.c: Ditto. * objfiles.h: Ditto. * osabi.c: Ditto. * p-typeprint.c: Ditto. * p-valprint.c: Ditto. * parse.c: Ditto. * printcmd.c: Ditto. * proc-events.c: Ditto. * procfs.c: Ditto. * progspace.c: Ditto. * progspace.h: Ditto. * psympriv.h: Ditto. * psymtab.c: Ditto. * record.c: Ditto. * regcache.c: Ditto. * regcache.h: Ditto. * remote-fileio.c: Ditto. * remote.c: Ditto. * ser-mingw.c: Ditto. * ser-tcp.c: Ditto. * ser-unix.c: Ditto. * serial.c: Ditto. * serial.h: Ditto. * solib-frv.c: Ditto. * solib-irix.c: Ditto. * solib-osf.c: Ditto. * solib-pa64.c: Ditto. * solib-som.c: Ditto. * solib-sunos.c: Ditto. * solib-svr4.c: Ditto. * solib-target.c: Ditto. * solib.c: Ditto. * somread.c: Ditto. * source.c: Ditto. * stabsread.c: Ditto. * stabsread.c: Ditto. * stack.c: Ditto. * stack.h: Ditto. * symfile-mem.c: Ditto. * symfile.c: Ditto. * symfile.h: Ditto. * symmisc.c: Ditto. * symtab.c: Ditto. * symtab.h: Ditto. * target-descriptions.c: Ditto. * target-memory.c: Ditto. * target.c: Ditto. * target.h: Ditto. * terminal.h: Ditto. * thread.c: Ditto. * top.c: Ditto. * tracepoint.c: Ditto. * tracepoint.h: Ditto. * ui-file.c: Ditto. * ui-file.h: Ditto. * ui-out.h: Ditto. * user-regs.c: Ditto. * user-regs.h: Ditto. * utils.c: Ditto. * valarith.c: Ditto. * valops.c: Ditto. * valprint.c: Ditto. * valprint.h: Ditto. * value.c: Ditto. * varobj.c: Ditto. * varobj.h: Ditto. * vec.h: Ditto. * xcoffread.c: Ditto. * xcoffsolib.c: Ditto. * xcoffsolib.h: Ditto. * xml-syscall.c: Ditto. * xml-tdesc.c: Ditto.
* run copyright.sh for 2011.Joel Brobecker2011-01-011-1/+1
|
* Fixed stabs cplus_specific issueswagiaal2010-08-091-1/+4
| | | | | | | | | 2010-08-09 Sami Wagiaalla <swagiaal@redhat.com> * symtab.c (symbol_get_demangled_name): Remove assertion and return NULL when language_specific.cplus_specific is not initialized. * stabsread.c (define_symbol): Set the name before calling cp_scan_for_anonymous_namespaces.
* create and use symbol_set_language.swagiaal2010-08-091-2/+2
| | | | | | | | | | | | | | | | | | | | | | 2010-08-09 Sami Wagiaalla <swagiaal@redhat.com> * symtab.h: Renamed SYMBOL_INIT_LANGUAGE_SPECIFIC to SYMBOL_SET_LANGUAGE. (symbol_init_language_specific): Renamed to symbol_set_language. * symtab.c (symbol_init_language_specific): Removed redundant check for language_cplus. Renamed to symbol_set_language. * stabsread.c (define_symbol): Updated. (read_enum_type): Updated * psymtab.c (add_psymbol_to_bcache): Updated. * minsyms.c (install_minimal_symbols): Updated. * coffread.c (process_coff_symbol): SYMBOL_SET_LANGUAGE instead of SYMBOL_LANGUAGE to set the language. * minsyms.c (prim_record_minimal_symbol_full): Ditto. * mdebugread.c (new_symbol): Ditto. * cp-namespace.c (check_one_possible_namespace_symbol): Ditto. * dwarf2read.c (new_symbol_full): Ditto. * jv-lang.c (add_class_symbol): Ditto.
* 2010-05-16 Michael Snyder <msnyder@vmware.com>Michael Snyder2010-05-161-7/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * scm-exp.c: White space. * scm-lang.c: White space. * scm-valprint.c: White space. * sentinel-frame.c: White space. * ser-base.c: White space. * ser-go32.c: White space. * serial.c: White space. * ser-mingw.c: White space. * ser-pipe.c: White space. * ser-tcp.c: White space. * ser-unix.c: White space. * solib.c: White space. * solib-darwin.c: White space. * solib-frv.c: White space. * solib-irix.c: White space. * solib-osf.c: White space. * solib-pa64.c: White space. * solib-som.c: White space. * solib-spu.c: White space. * solib-svr4.c: White space. * solib-target.c: White space. * source.c: White space. * stabsread.c: White space. * stack.c: White space. * std-regs.c: White space. * symfile.c: White space. * symmisc.c: White space. * symtab.c: White space.
* gdb/Jan Kratochvil2010-05-081-18/+18
| | | | | | | | | | | * dwarf2read.c (typename_concat): Use (char *) NULL terminated stdarg list for the obconcat call. * mdebugread.c (parse_symbol): Likewise. * stabsread.c (define_symbol, read_member_functions, read_cpp_abbrev): Likewise. * symfile.c (obconcat): Replace the s1, s2 and s3 parameters by `...'. New variable ap. Remove variables len and val. * symfile.h (obconcat): Likewise for the prototype.
* 2010-05-05 Michael Snyder <msnyder@vmware.com>Michael Snyder2010-05-051-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * elfread.c (elf_symtab_read): Delete unused variable. (find_separate_debug_file_by_buildid): Delete unused variables. (elf_symfile_read): Delete unused variable. * coffread.c (coff_symfile_read): Delete unused variables. * coff-pe-read.c (add_pe_exported_sym): Delete unused variable. (read_pe_exported_syms): Delete unused variable. * stabsread.c (define_symbol): Delete unused variable. * dwarf2read.c (read_type_comp_unit_head): Delete unused variable. (process_psymtab_comp_unit): Delete unused variable. (dwarf2_build_psymtabs_hard): Delete unused variable. (load_partial_comp_unit): Delete unused variable. (create_all_comp_units): Delete unused variable. (scan_partial_symbols): Delete unused variable. (add_partial_symbol): Delete unused variable. (add_partial_namespace): Delete unused variable. (add_partial_enumeration): Delete unused variable. (load_full_comp_unit): Delete unused variable. (process_full_comp_unit): Delete unused variable. (read_file_scope): Delete unused variable. (read_type_unit_scope): Delete unused variable. (process_structure_scope): Delete unused variable. (process_enumeration_scope): Delete unused variable. (read_tag_ptr_to_member_type): Delete unused variable. (read_typedef): Delete unused variable. (read_partial_die): Delete unused variable. (decode_locdesc): Delete unused variable. (zeroed_partial_die): Delete unused global variable.
* * Remove unwanted space in set_length_in_type_chain parameterdeclarationPierre Muller2010-04-221-1/+1
|
* PR stabs/11479.Pierre Muller2010-04-221-0/+38
| | | | | | * stabsread.c (set_length_in_type_chain): New function. (read_struct_type): Call set_length_in_type_chain function. (read_enum_type): Idem.
* * gdb/stabsread.c (define_symbol): Add support for charPierre Muller2010-04-051-0/+69
| | | | | | | | | | | | | and string constants. * gdb/testsuite/gdb.stabs/aout.sed: Convert all backslash to double backslash within one line, unless it is followed by a double quote. * gdb/testsuite/gdb.stabs/hppa.sed: Idem. * gdb/testsuite/gdb.stabs/weird.def: Add char and String constants * gdb/testsuite/gdb.stabs/weird.exp: Check for correct parsing of chhar and string constants. * gdb/testsuite/gdb.stabs/xcoff.sed: Ignore escaped quote quotes in .stabs to .stabx substitution.
* gdb/Jan Kratochvil2010-01-081-1/+11
| | | | | | | * stabsread.c (read_args): Handle zero arguments. gdb/testsuite/ * gdb.stabs/weird.def (args93): New.
* Update copyright year in most headers.Joel Brobecker2010-01-011-1/+1
| | | | Automatic update by copyright.sh.
* * xcoffread.c (scan_xcoff_symtab): Update.Tom Tromey2009-11-161-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * symfile.h (add_psymbol_to_list): Update prototype. * symfile.c (add_psymbol_to_bcache): Add copy_name argument. (add_psymbol_to_list): Likewise. * stabsread.c (define_symbol): Update. * mdebugread.c (parse_partial_symbols): Update. (handle_psymbol_enumerators): Update. (new_symbol): Update. * dbxread.c (read_dbx_symtab): Update. * coffread.c (process_coff_symbol): Update. * symtab.h (prim_record_minimal_symbol_full): Declare. (SYMBOL_SET_NAMES): Add copy_name argument. * symtab.c (struct demangled_name_entry): New struct. (hash_demangled_name_entry): New function. (eq_demangled_name_entry): Likewise. (create_demangled_names_hash): Use new functions. (symbol_set_names): Use struct demangled_name_entry. Add copy_name argument. * minsyms.c (prim_record_minimal_symbol_full): New function. (prim_record_minimal_symbol_and_info): Use it. * elfread.c (record_minimal_symbol): Add name_len and copy_name arguments. Call prim_record_minimal_symbol_full. (elf_symtab_read): Add copy_names argument. (elf_symfile_read): Update calls to elf_symtab_read. * dwarf2read.c (add_partial_symbol): Don't copy symbol names. (load_partial_dies): Likewise. (new_symbol): Likewise. * cp-namespace.c (check_one_possible_namespace_symbol): Don't save name on the obstack. Update call to SYMBOL_SET_NAMES.
* * symtab.h (SYMBOL_SET_LINKAGE_NAME): Update comment.Tom Tromey2009-11-051-6/+2
| | | | | | | | | | | | * symfile.c (allocate_symtab): Don't use obsavestring on a constant string. * stabsread.c (define_symbol): Don't use obsavestring on a constant string. * mdebugread.c (parse_type): Don't use obsavestring on a constant string. (new_symtab): Likewise. * elfread.c (elf_symtab_read): Don't use obsavestring on a constant string.
* * gdbtypes.h (make_function_type): Remove OBJFILE parameter.Ulrich Weigand2009-06-291-3/+2
| | | | | | | | | | * gdbtypes.c (make_function_type): Remove OBJFILE parameter. (lookup_function_type): Update call. * stabsread.c (read_type): Likewise. * dwarf2read.c (read_subroutine_type): Use lookup_function_type instead of make_function_type. * jv-lang.c (type_from_class): Likewise. Do not allocate types on the fake "dynamics" obstack.
* * gdbtypes.h (struct builtin_type): Remove builtin_core_addr,Ulrich Weigand2009-06-291-75/+89
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | nodebug_text_symbol, nodebug_data_symbol, nodebug_unknown_symbol, and nodebug_tls_symbol members. (struct objfile_type): New data structure. (objfile_type): Add prototype. * gdbtypes.c (gdbtypes_post_init): Remove initialization code for types no longer in struct builtin_type. (objfile_type_data): New static variable. (_initialize_gdbtypes): Initialize it. (objfile_type): New function. * gdbtypes.h (builtin_type_error): Remove. * gdbtypes.c (build_complex): Do not use builtin_type_error. * symtab.c (builtin_type_error): Remove. (_initialize_symtab): Remove initialization. * stabsread.c (dbx_lookup_type, define_symbol, error_type, rs6000_builtin_type, read_range_type): Use per-objfile types instead of global or per-architecture builtin types. * coffread.c (decode_type): Likewise. * dwarf2read.c (read_array_type, read_tag_string_type, new_symbol, die_type): Likewise. * mdebugread.c (parse_symbol, basic_type, upgrade_type, parse_procedure, psymtab_to_symtab_1): Likewise. * xcoffread.c (process_xcoff_symbol): Likewise. * parse.c (write_exp_msymbol): Likewise. * stabsread.c (rs6000_builtin_type_data): New static variable. (_initialize_stabsread): Initialize it. (rs6000_builtin_type): Add OBJFILE argument. Allocate builtin types per-objfile instead of globally. * stabsread.c (dbx_lookup_type): Add OBJFILE argument. Use it instead of current_objfile; pass it to rs6000_builtin_type. (dbx_alloc_type, read_type, read_range_type): Update calls. (cleanup_undefined_types_noname): Add OBJFILE argument and pass it to dbx_lookup_type. (cleanup_undefined_types): Add OBJFILE argument and pass it to cleanup_undefined_types_noname. * stabsread.h (cleanup_undefined_types): Add OBJFILE argument. * buildsym.c (end_symtab): Update call.
* * symtab.h: Rename SYMBOL_OPS to SYMBOL_COMPUTED_OPS.Ulrich Weigand2009-06-041-33/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * ax-gdb.c (gen_var_ref): Likewise. * findvar.c (read_var_value, symbol_read_needs_frame): Likewise. * printcmd.c (address_info): Likewise. * dwarf2loc.c (dwarf_expr_frame_base): Likewise. * dwarf2read.c (dwarf2_symbol_mark_computed): Likewise. * symtab.h: Rename struct symbol_ops to struct symbol_computed_ops. * dwarf2loc.h: Likewise. * dwarf2loc.c (dwarf2_locexpr_funcs, dwarf2_loclist_funcs): Likewise. * symtab.h: (struct symbol_register_ops): New struct definition. (struct symbol): Make "ops" member a union of symbol_computed_ops and symbol_register_ops callback pointers. (SYMBOL_REGISTER_OPS): New macro. * tracepoint.c: Include "objfiles.h". (scope_info, collect_symbol): Use SYMBOL_REGISTER_OPS register_number callback to retrieve register numbers. * ax-gdb.c (gen_var_ref): Likewise. * findvar.c (read_var_value): Likewise. * printcmd.c (address_info): Likewise. * coffread.c (coff_reg_to_regnum): New function. (coff_register_funcs): New static variable. (process_coff_symbol): Do not call gdbarch_sdb_reg_to_regnum. Install SYMBOL_REGISTER_OPS callbacks. * mdebugread.c (mdebug_reg_to_regnum): New function. (mdebug_register_funcs): New static variable. (parse_symbol): Do not call gdbarch_ecoff_reg_to_regnum. Install SYMBOL_REGISTER_OPS callbacks. * stabsread.c (stab_reg_to_regnum): New function. (stab_register_funcs): New static variable. (define_symbol): Do not call gdbarch_stab_reg_to_regnum. Install SYMBOL_REGISTER_OPS callbacks.
* gdb/Jan Kratochvil2009-05-011-2/+3
| | | | | | | | | | | | Make specifiable the make_function_type type memory ownership. * gdbtypes.c (make_function_type): New parameter `objfile', use it explicitely instead of TYPE-initialized removed local variable `objfile'. Describe `objfile' it in the function comment. (lookup_function_type): Update make_function_type callers. * gdbtypes.h (make_function_type): Update the prototype. * jv-lang.c (java_link_class_type): Update make_function_type callers. * dwarf2read.c (read_subroutine_type): Likewise. * stabsread.c (read_type): Likewise.
* * stabsread.c (read_member_functions): GCC may emit an extra spaceKeith Seitz2009-04-021-2/+2
| | | | | at the end of the names "__base_ctor" and "__base_dtor"; so ignore whitespace when looking for these functions.
* gdbTom Tromey2009-03-311-11/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2009-03-31 Daniel Jacobowitz <dan@codesourcery.com> Keith Seitz <keiths@redhat.com> Jan Kratochvil <jan.kratochvil@redhat.com> PR gdb/6817 * Makefile.in (dbxread.o): Update. * dbxread.c (read_dbx_symtab): Use cp_canonicalize_string. * dwarf2read.c (GDB_FORM_cached_string): New. (read_partial_die): Use dwarf2_canonicalize_name. (dwarf2_linkage_name): Use dwarf2_name. (dwarf2_canonicalize_name): New. (dwarf2_name): Use dwarf2_canonicalize_name. (dwarf_form_name, dump_die): Handle GDB_FORM_cached_string. * stabsread.c (define_symbol, read_type): Use cp_canonicalize_string. * symtab.c (lookup_symbol_in_language): Canonicalize input before searching. * cp-name-parser.y: operator() requires two parameters, according to libiberty. * minsyms.c (lookup_minimal_symbol): Canonicalize input before searching. * NEWS: Update. gdb/testsuite 2009-03-31 Daniel Jacobowitz <dan@codesourcery.com> Jan Kratochvil <jan.kratochvil@redhat.com> PR gdb/931 * gdb.cp/gdb1355.exp (f_li, f_lui, f_si, f_sui): Allow canonical output. * gdb.cp/templates.exp: Allow canonical output. Remove KFAILs for gdb/931. * dw2-strp.S (DW_AT_language): Change to C++. (DW_TAG_variable (name ""), Abbrev code 7, .Lemptyname): New.
* 2008-02-21 Pedro Alves <pedro@codesorcery.com>Pedro Alves2009-02-211-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Silence a few -Wmissing-prototypes warnings. PR build/9877: * amd64-nat.c: Include "amd64-nat.h". * fork-child.c (_initialize_fork_child): Ditto. * gcore.c (_initialize_gcore): Ditto. * inf-ptrace.c: Include "inf-ptrace.h". (inf_ptrace_store_registers): Make it static. * linux-nat.c (linux_nat_terminal_ours): Make it static. (_initialize_linux_nat): Declare before definition. * linux-tdep.c: Include "linux-tdep.h". * linux-thread-db.c (_initialize_thread_db): Declare before definition. * proc-service.c (_initialize_proc_service): Ditto. * remote.c (remote_send_printf): Make it static. * solib.c: Include "solib.h". * symfile-mem.c (_initialize_symfile_mem): Declare before definition. * ada-lang.c (ada_la_decode, ada_match_name) (ada_suppress_symbol_printing, ada_is_array_type) (ada_value_ptr_subscript, ada_array_length) (ada_to_static_fixed_value): Make them static. (_initialize_ada_language): Declare before definition. * ada-tasks.c (ada_get_task_number, ada_get_environment_task) (ada_task_list_changed, ada_new_objfile_observer): Make them static. (_initialize_tasks): Declare before definition. * addrmap.c (_initialize_addrmap): Declare before definition. * auxv.c (default_auxv_parse): Make it static. * bfd-target.c (target_bfd_xfer_partial, target_bfd_xclose): Make them static. * breakpoint.c (remove_sal): Add line break. (expand_line_sal_maybe): Make it static. * cp-name-parser.y: Include "cp-support.h". * cp-valprint.c (cp_find_class_member): Make it static. * eval.c (value_f90_subarray): Ditto. * exceptions.c (print_any_exception): Ditto. * findcmd.c (_initialize_mem_search): Declare before definition. * frame.c (frame_observer_target_changed): Make it static. * gnu-v3-abi.c (gnuv3_find_method_in): Make it static. * inf-child.c: Include "inf-child.h". * inferior.h (valid_inferior_id): Rename to ... (valid_gdb_inferior_id): ... this. * infrun.c (infrun_thread_stop_requested, siginfo_make_value): Make them static. * jv-lang.c (java_language_arch_info): Make it static. * m2-typeprint.c (m2_get_discrete_bounds): Ditto. * osdata.c (info_osdata_command): Make it static. * regcache.c (regcache_observer_target_changed): Make it static. * reverse.c (_initialize_reverse): Declare before definition. * stabsread.c (cleanup_undefined_types_noname) (cleanup_undefined_types_1): Make them static. * symfile.c (place_section): Make it static. * symtab.c (find_pc_sect_psymtab_closer): Make it static. * target-descriptions.c (_initialize_target_descriptions): Declare before definition. * target.c (default_get_ada_task_ptid, find_default_can_async_p) (find_default_is_async_p, find_default_supports_non_stop): Make them static. (target_supports_non_stop): Add prototype. (dummy_pid_to_str): Make it static. * utils.c (_initialize_utils): Declare before definition. * ada-exp.y (_initialize_ada_exp): Declare before definition. * solib-svr4.c (HAS_LM_DYNAMIC_FROM_LINK_MAP): Add a prototype. * target.h (struct target_ops): Add a prototype to the to_can_execute_reverse callback. * macroscope.c (_initialize_macroscope): Declare before definition. * cp-namespace.c (_initialize_cp_namespace): Declare before definition. * python/python.c (_initialize_python): Declare before definition. * tui/tui-command.c: Include "tui/tui-command.h". * tui/tui-data.c (init_content_element, init_win_info): Make them static. * tui/tui-disasm.c: Include "tui/tui-disasm.h". * tui/tui-interp.c (_initialize_tui_interp): Declare before definition. * tui/tui-layout.c: Include "tui/tui-layout.h". (_initialize_tui_layout): Declare before definition. * tui/tui-regs.c: Include "tui/tui-regs.h". (tui_display_reg_element_at_line): Make it static. (_initialize_tui_regs): Declare before definition. * tui/tui-stack.c (_initialize_tui_stack): Declare before definition. * tui/tui-win.c: Include "tui/tui-win.h". (_initialize_tui_win): Declare before definition. (tui_sigwinch_handler): Make it static. Wrap in ifdef SIGWINCH. * tui/tui-win.h (tui_sigwinch_handler): Delete declaration. (tui_get_cmd_list): Add a prototype. * tui/tui-windata.c: Include tui-windata.h. * tui/tui-wingeneral.c (box_win): Make it static. * cli/cli-logging.c (show_logging_command): Make it static. (_initialize_cli_logging): Declare before definition. * mi/mi-common.c (_initialize_gdb_mi_common): Declare before definition.
* Updated copyright notices for most files.Joel Brobecker2009-01-031-1/+1
|
* gdb:Tom Tromey2008-08-241-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * xml-tdesc.c (tdesc_end_union): Update. * stabsread.c (define_symbol): Update. (read_type): Update. (read_struct_type): Update. (read_enum_type): Update. * spu-tdep.c (spu_builtin_type_vec128): Update. * sh-tdep.c (sh_push_dummy_call_fpu): Update. (sh_push_dummy_call_nofpu): Update. * mdebugread.c (parse_symbol): Update. (parse_symbol): Update. (parse_symbol): Update. (upgrade_type): Update. * jv-lang.c (java_lookup_class): Update. * iq2000-tdep.c (iq2000_pointer_to_address): Update. * i386-tdep.c (i386_mmx_type): Update. (i386_sse_type): Update. * gdbtypes.h (enum type_flag_value): New enum. (enum type_instance_flag_value): New enum. (TYPE_FLAG_UNSIGNED, TYPE_FLAG_NOSIGN, TYPE_FLAG_STUB, TYPE_FLAG_TARGET_STUB, TYPE_FLAG_STATIC, TYPE_FLAG_PROTOTYPED, TYPE_FLAG_INCOMPLETE, TYPE_FLAG_VARARGS, TYPE_FLAG_VECTOR, TYPE_FLAG_FIXED_INSTANCE, TYPE_FLAG_STUB_SUPPORTED, TYPE_FLAG_NOTTEXT): Now enum constants. (TYPE_FLAG_CONST, TYPE_FLAG_VOLATILE, TYPE_FLAG_CODE_SPACE, TYPE_FLAG_DATA_SPACE, TYPE_FLAG_ADDRESS_CLASS_1, TYPE_FLAG_ADDRESS_CLASS_2): Remove. (TYPE_INSTANCE_FLAG_CONST, TYPE_INSTANCE_FLAG_VOLATILE, TYPE_INSTANCE_FLAG_CODE_SPACE, TYPE_INSTANCE_FLAG_DATA_SPACE, TYPE_INSTANCE_FLAG_ADDRESS_CLASS_1, TYPE_INSTANCE_FLAG_ADDRESS_CLASS_2): New constants. (TYPE_UNSIGNED, TYPE_NOSIGN, TYPE_STUB, TYPE_TARGET_STUB, TYPE_STATIC, TYPE_PROTOTYPED, TYPE_INCOMPLETE, TYPE_VARARGS, TYPE_VECTOR, TYPE_FIXED_INSTANCE, TYPE_STUB_SUPPORTED, TYPE_NOTTEXT): Update. (TYPE_FLAG_ADDRESS_CLASS_ALL): Remove. (TYPE_INSTANCE_FLAG_ADDRESS_CLASS_ALL): New define. (TYPE_VOLATILE, TYPE_CODE_SPACE, TYPE_DATA_SPACE, TYPE_ADDRESS_CLASS_1, TYPE_ADDRESS_CLASS_2, TYPE_ADDRESS_CLASS_ALL): Update. (struct main_type) <flags>: Remove. <flag_unsigned, flag_nosign, flag_stub, flag_target_stub, flag_static, flag_prototyped, flag_incomplete, flag_varargs, flag_vector, flag_stub_supported, flag_nottext, flag_fixed_instance>: New fields. <nfields, vptr_fieldno>: Move earlier. (TYPE_FLAGS): Remove. * gdbtypes.c (make_pointer_type): Update. (address_space_name_to_int): Update. (address_space_int_to_name): Update. (make_type_with_address_space): Update. (make_cv_type): Update. (create_range_type): Update. (get_discrete_bounds): Update. (create_set_type): Update. (make_vector_type): Update. (smash_to_method_type): Update. (check_typedef): Update. (check_stub_method): Update. (init_type): Individually assign flag fields. (recursive_dump_type): Don't print entire TYPE_FLAGS field. Do print TYPE_FIXED_INSTANCE, TYPE_STUB_SUPPORTED, and TYPE_NOTTEXT. (copy_type_recursive): Copy the entire main type. Don't use TYPE_FLAGS. * features/rs6000/powerpc-altivec64l.c (initialize_tdesc_powerpc_altivec64l): Update. * features/rs6000/powerpc-altivec64.c (initialize_tdesc_powerpc_altivec64): Update. * features/rs6000/powerpc-altivec32l.c (initialize_tdesc_powerpc_altivec32l): Update. * features/rs6000/powerpc-altivec32.c (initialize_tdesc_powerpc_altivec32): Update. * features/rs6000/powerpc-7400.c (initialize_tdesc_powerpc_7400): Update. * features/arm-with-iwmmxt.c (initialize_tdesc_arm_with_iwmmxt): Update. * dwarf2read.c (read_structure_type): Update. (read_enumeration_type): Likewise. (process_enumeration_scope): Likewise. (read_tag_pointer_type): Likewise. (read_subroutine_type): Likewise. (read_subroutine_type): Likewise. (read_base_type): Likewise. * coffread.c (coff_read_enum_type): Update. * ada-valprint.c (adjust_type_signedness): Update. * ada-typeprint.c (print_record_field_types): Update. * ada-lang.c (packed_array_type): Update. (empty_record): Don't reset TYPE_FLAGS. (ada_template_to_fixed_record_type_1): Update. (ada_template_to_fixed_record_type_1): Likewise. (template_to_static_fixed_type): Likewise. (to_record_with_fixed_variant_part): Likewise. (to_fixed_record_type): Likewise. (to_fixed_array_type): Likewise. (to_static_fixed_type): Likewise. gdb/testsuite: * gdb.base/maint.exp: Update "maint print type".
* * buildsym.c (add_symbol_to_list): Do not callDaniel Jacobowitz2008-08-211-0/+2
| | | | | | | | | | | | | | | | | | | | | | | cp_scan_for_anonymous_namespaces here. (finish_block): Do not call cp_set_block_scope here. * cp-namespace.c (processing_has_namespace_info) (processing_current_prefix): Delete. (cp_initialize_namespace): Do not initialize processing_has_namespace_info. (cp_scan_for_anonymous_namespaces): Use SYMBOL_DEMANGLED_NAME. Do not check processing_has_namespace_info. (cp_set_block_scope): Take prefix and namespace info flag as arguments. Honor namespaces regardless of a demangled name. * cp-support.h (processing_has_namespace_info) (processing_current_prefix): Delete declarations. (cp_set_block_scope): Update prototype. * dwarf2read.c (processing_has_namespace_info) (processing_current_prefix): New static variables. (read_file_scope): Initialize processing_has_namespace_info. (read_func_scope): Call cp_set_block_scope for C++. (new_symbol): Call cp_scan_for_anonymous_namespaces for C++. * symtab.c (symbol_demangled_name): Accept a const argument. * symtab.h (symbol_demangled_name): Update prototype.
* * ax-gdb.c (gen_var_ref): Use SYMBOL_LINKAGE_NAME.Daniel Jacobowitz2008-08-211-42/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * blockframe.c (find_pc_partial_function): Likewise. * buildsym.c (find_symbol_in_list): Likewise. * c-valprint.c (c_val_print): Likewise. * coffread.c (patch_opaque_types, process_coff_symbol): Likewise. (coff_read_enum_type): Likewise. Use SYMBOL_SET_LINKAGE_NAME. * cp-support.c (cp_remove_params): Renamed from remove_params and made global. (overload_list_add_symbol): Update call to remove_params. * cp-support.h (cp_remove_params): Declare. * dwarf2read.c (process_enumeration_scope): Use SYMBOL_LINKAGE_NAME. (dwarf2_const_value): Use SYMBOL_PRINT_NAME. * expprint.c (dump_subexp_body_standard): Likewise. * f-valprint.c (info_common_command, there_is_a_visible_common_named): Use SYMBOL_LINKAGE_NAME to find symbols and SYMBOL_PRINT_NAME for messages. * findvar.c (read_var_value): Use SYMBOL_LINKAGE_NAME. * gnu-v2-abi.c (gnuv2_value_rtti_type): Likewise. * hppa-hpux-tdep.c (hppa32_hpux_in_solib_call_trampoline) (hppa_hpux_skip_trampoline_code): Use SYMBOL_LINKAGE_NAME to find symbols and SYMBOL_PRINT_NAME for messages. * jv-lang.c (add_class_symbol): Use SYMBOL_SET_LINKAGE_NAME. * linespec.c (decode_line_2): Use SYMBOL_LINKAGE_NAME. * mdebugread.c (parse_symbol): Use SYMBOL_LINKAGE_NAME and SYMBOL_SET_LINKAGE_NAME. (mylookup_symbol): Use SYMBOL_LINKAGE_NAME. * minsyms.c (add_minsym_to_demangled_hash_table): Use SYMBOL_SEARCH_NAME. (lookup_minimal_symbol): Use SYMBOL_LINKAGE_NAME or SYMBOL_MATCHES_SEARCH_NAME, depending on the pass. * objfiles.h (ALL_OBJFILE_MSYMBOLS): Use SYMBOL_LINKAGE_NAME. * printcmd.c (build_address_symbolic): Use SYMBOL_LINKAGE_NAME. (address_info): Use SYMBOL_PRINT_NAME for messages and SYMBOL_LINKAGE_NAME for lookups. * sol-thread.c (info_cb): Use SYMBOL_PRINT_NAME for messages. * stabsread.c (patch_block_stabs, define_symbol) (read_type, read_enum_type, common_block_end) (cleanup_undefined_types_1, scan_file_globals): Use SYMBOL_LINKAGE_NAME, SYMBOL_SET_LINKAGE_NAME, ALL_OBJFILE_MSYMBOLS, and SYMBOL_PRINT_NAME. * stack.c (print_frame_args): Use SYMBOL_LINKAGE_NAME. (print_frame, frame_info): Use SYMBOL_PRINT_NAME for output. Use cp_remove_params instead of cplus_demangle. (print_block_frame_labels, print_frame_arg_vars): Use SYMBOL_LINKAGE_NAME. * symmisc.c (dump_msymbols): Use ALL_OBJFILE_MSYMBOLS and SYMBOL_LINKAGE_NAME. (dump_symtab_1, print_symbol, print_partial_symbols) (maintenance_check_symtabs): Use SYMBOL_LINKAGE_NAME. * symtab.h (DEPRECATED_SYMBOL_NAME): Delete. (SYMBOL_SET_LINKAGE_NAME): New. (SYMBOL_SET_NAMES): Add a comment. * tracepoint.c (set_traceframe_context, validate_actionline) (collect_symbol, scope_info): Use SYMBOL_LINKAGE_NAME for lookups and SYMBOL_PRINT_NAME for output. * typeprint.c (typedef_print): Use SYMBOL_LINKAGE_NAME. * xcoffread.c (process_xcoff_symbol): Use SYMBOL_SET_LINKAGE_NAME.