aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2019-05-09[binutils][aarch64] New SVE_SHRIMM_UNPRED_22 operand.Matthew Malcomson12-32/+87
Include a new iclass to extract the variant from the most significant 3 bits of this operand. Instructions such as rshrnb include a constant shift amount as an operand, where the most significant three bits of this operand determine what size elements the instruction is operating on. The new SVE_SHRIMM_UNPRED_22 operand denotes this constant encoded in bits 22:20-19:18-16 while the new sve_shift_tsz_hsd iclass denotes that the SVE qualifier is encoded in bits 22:20-19. gas/ChangeLog: 2019-05-09 Matthew Malcomson <matthew.malcomson@arm.com> * config/tc-aarch64.c (parse_operands): Handle new SVE_SHRIMM_UNPRED_22 operand. include/ChangeLog: 2019-05-09 Matthew Malcomson <matthew.malcomson@arm.com> * opcode/aarch64.h (enum aarch64_opnd): New SVE_SHRIMM_UNPRED_22 operand. (enum aarch64_insn_class): Add sve_shift_tsz_hsd iclass. opcodes/ChangeLog: 2019-05-09 Matthew Malcomson <matthew.malcomson@arm.com> * aarch64-asm-2.c: Regenerated. * aarch64-dis-2.c: Regenerated. * aarch64-opc-2.c: Regenerated. * aarch64-asm.c (aarch64_ins_sve_shrimm): (aarch64_encode_variant_using_iclass): Handle sve_shift_tsz_hsd iclass encode. * aarch64-dis.c (aarch64_decode_variant_using_iclass): Handle sve_shift_tsz_hsd iclass decode. * aarch64-opc.c (operand_general_constraint_met_p): Constraint checking for SVE_SHRIMM_UNPRED_22. (aarch64_print_operand): Add printing for SVE_SHRIMM_UNPRED_22. * aarch64-tbl.h (AARCH64_OPERANDS): Use new SVE_SHRIMM_UNPRED_22 operand.
2019-05-09[binutils][aarch64] New sve_size_013 iclass.Matthew Malcomson5-0/+30
Add sve_size_013 instruction class This new iclass handles instructions such as pmullb whose size specifier can only be encoded as 0, 1, or 3. include/ChangeLog: 2019-05-09 Matthew Malcomson <matthew.malcomson@arm.com> * opcode/aarch64.h (enum aarch64_insn_class): Add sve_size_013 iclass. opcodes/ChangeLog: 2019-05-09 Matthew Malcomson <matthew.malcomson@arm.com> * aarch64-asm.c (aarch64_encode_variant_using_iclass): Handle sve_size_013 iclass encode. * aarch64-dis.c (aarch64_decode_variant_using_iclass): Handle sve_size_013 iclass decode.
2019-05-09[binutils][aarch64] New sve_size_bh iclass.Matthew Malcomson5-0/+14
Add new iclass sve_size_bh to handle instructions that have two variants encoded with the SVE_sz field. This iclass behaves the same as the sve_size_sd iclass, but it has a nicer name for those instructions that choose between variants using the "B" and "H" size qualifiers. include/ChangeLog: 2019-05-09 Matthew Malcomson <matthew.malcomson@arm.com> * opcode/aarch64.h (enum aarch64_insn_class): Add sve_size_bh iclass. opcodes/ChangeLog: 2019-05-09 Matthew Malcomson <matthew.malcomson@arm.com> * aarch64-asm.c (aarch64_encode_variant_using_iclass): Handle sve_size_bh iclass encode. * aarch64-dis.c (aarch64_decode_variant_using_iclass): Handle sve_size_bh iclass decode.
2019-05-09[binutils][aarch64] New sve_size_sd2 iclass.Matthew Malcomson7-0/+24
Define new sve_size_sd2 iclass to distinguish between the two variants of ldnt1sb and ldnt1sh. include/ChangeLog: 2019-05-09 Matthew Malcomson <matthew.malcomson@arm.com> * opcode/aarch64.h (enum aarch64_insn_class): Add sve_size_sd2 iclass. opcodes/ChangeLog: 2019-05-09 Matthew Malcomson <matthew.malcomson@arm.com> * aarch64-asm.c (aarch64_encode_variant_using_iclass): Handle sve_size_sd2 iclass encode. * aarch64-dis.c (aarch64_decode_variant_using_iclass): Handle sve_size_sd2 iclass decode. * aarch64-opc.c (fields): Handle SVE_sz2 field. * aarch64-opc.h (enum aarch64_field_kind): New SVE_sz2 field.
2019-05-09[binutils][aarch64] New SVE_ADDR_ZX operand.Matthew Malcomson10-70/+159
Add AARCH64_OPND_SVE_ADDR_ZX operand that allows a vector of addresses in a Zn register, offset by an Xm register. This is used with scatter/gather SVE2 instructions. gas/ChangeLog: 2019-05-09 Matthew Malcomson <matthew.malcomson@arm.com> * config/tc-aarch64.c (REG_ZR): Macro specifying zero register. (parse_address_main): Account for new addressing mode [Zn.S, Xm]. (parse_operands): Handle new SVE_ADDR_ZX operand. include/ChangeLog: 2019-05-09 Matthew Malcomson <matthew.malcomson@arm.com> * opcode/aarch64.h (enum aarch64_opnd): New SVE_ADDR_ZX operand. opcodes/ChangeLog: 2019-05-09 Matthew Malcomson <matthew.malcomson@arm.com> * aarch64-asm-2.c: Regenerated. * aarch64-dis-2.c: Regenerated. * aarch64-opc-2.c: Regenerated. * aarch64-opc.c (operand_general_constraint_met_p): Constraint checking for SVE_ADDR_ZX. (aarch64_print_operand): Add printing for SVE_ADDR_ZX. * aarch64-tbl.h (AARCH64_OPERANDS): Use new SVE_ADDR_ZX operand.
2019-05-09[binutils][aarch64] New SVE_Zm3_11_INDEX operand.Matthew Malcomson11-14/+50
Introduce new operand SVE_Zm3_11_INDEX that indicates a register between z0-z7 stored in bits 18-16 and an index stored in bits 20-19:11. gas/ChangeLog: 2019-05-09 Matthew Malcomson <matthew.malcomson@arm.com> * config/tc-aarch64.c (parse_operands): Handle new SVE_Zm3_11_INDEX operand. include/ChangeLog: 2019-05-09 Matthew Malcomson <matthew.malcomson@arm.com> * opcode/aarch64.h (enum aarch64_opnd): New SVE_Zm3_11_INDEX operand. opcodes/ChangeLog: 2019-05-09 Matthew Malcomson <matthew.malcomson@arm.com> * aarch64-asm-2.c: Regenerated. * aarch64-dis-2.c: Regenerated. * aarch64-opc-2.c: Regenerated. * aarch64-opc.c (operand_general_constraint_met_p): Constraint checking for SVE_Zm3_11_INDEX. (aarch64_print_operand): Add printing for SVE_Zm3_11_INDEX. (fields): Handle SVE_i3l and SVE_i3h2 fields. * aarch64-opc.h (enum aarch64_field_kind): New SVE_i3l and SVE_i3h2 fields. * aarch64-tbl.h (AARCH64_OPERANDS): Use new SVE_Zm3_11_INDEX operand.
2019-05-09[binutils][aarch64] New iclass sve_size_hsd2.Matthew Malcomson7-0/+28
Add "sve_size_hsd2" iclass decode that uses the new FLD_SVE_size field value to determine the variant of an instruction. include/ChangeLog: 2019-05-09 Matthew Malcomson <matthew.malcomson@arm.com> * opcode/aarch64.h (enum aarch64_insn_class): Add sve_size_hsd2 iclass. opcodes/ChangeLog: 2019-05-09 Matthew Malcomson <matthew.malcomson@arm.com> * aarch64-asm.c (aarch64_encode_variant_using_iclass): Handle sve_size_hsd2 iclass encode. * aarch64-dis.c (aarch64_decode_variant_using_iclass): Handle sve_size_hsd2 iclass decode. * aarch64-opc.c (fields): Handle SVE_size field. * aarch64-opc.h (enum aarch64_field_kind): New SVE_size field.
2019-05-09[binutils][aarch64] Introduce SVE_IMM_ROT3 operand.Matthew Malcomson11-38/+69
New operand AARCH64_OPND_SVE_IMM_ROT3 handles a single bit rotate operand encoded at bit position 10. gas/ChangeLog: 2019-05-09 Matthew Malcomson <matthew.malcomson@arm.com> * config/tc-aarch64.c (parse_operands): Handle new SVE_IMM_ROT3 operand. include/ChangeLog: 2019-05-09 Matthew Malcomson <matthew.malcomson@arm.com> * opcode/aarch64.h (enum aarch64_opnd): New SVE_IMM_ROT3 operand. opcodes/ChangeLog: 2019-05-09 Matthew Malcomson <matthew.malcomson@arm.com> * aarch64-asm-2.c: Regenerated. * aarch64-dis-2.c: Regenerated. * aarch64-opc-2.c: Regenerated. * aarch64-opc.c (operand_general_constraint_met_p): Constraint checking for SVE_IMM_ROT3. (aarch64_print_operand): Add printing for SVE_IMM_ROT3. (fields): Handle SVE_rot3 field. * aarch64-opc.h (enum aarch64_field_kind): New SVE_rot3 field. * aarch64-tbl.h (AARCH64_OPERANDS): Use new SVE_IMM_ROT3 operand.
2019-05-09[binutils][aarch64] Allow movprfx for SVE2 instructions.Matthew Malcomson2-1/+8
SVE2 introduces a number of new instructions that work with the movprfx instruction. This commit ensures that SVE2 instructions are accounted for. opcodes/ChangeLog: 2019-05-09 Matthew Malcomson <matthew.malcomson@arm.com> * aarch64-opc.c (verify_constraints): Check for movprfx for sve2 instructions.
2019-05-09[binutils][aarch64] SVE2 feature extension flags.Matthew Malcomson7-0/+90
Include all feature flag macros. The "sve2" extension that enables the core sve2 instructions. This also enables the sve extension, since sve is a requirement of sve2. Extra optional sve2 features are the bitperm, sm4, aes, and sha3 extensions. These are all given extra feature flags, "bitperm", "sve2-sm4", "sve2-aes", and "sve2-sha3" respectively. The sm4, aes, and sha3 extensions are explicitly marked as sve2 extensions to distinguish them from the corresponding NEON extensions. Rather than continue extending the current feature flag numbers, I used some bits that have been skipped. gas/ChangeLog: 2019-05-09 Matthew Malcomson <matthew.malcomson@arm.com> * config/tc-aarch64.c: Add command line architecture feature flags "sve2", "sve2-sm4", "sve2-aes", "sve2-sha3", "bitperm". * doc/c-aarch64.texi: Document new architecture feature flags. include/ChangeLog: 2019-05-09 Matthew Malcomson <matthew.malcomson@arm.com> * opcode/aarch64.h (AARCH64_FEATURE_SVE2 AARCH64_FEATURE_SVE2_AES, AARCH64_FEATURE_SVE2_BITPERM, AARCH64_FEATURE_SVE2_SM4, AARCH64_FEATURE_SVE2_SHA3): New feature macros. opcodes/ChangeLog: 2019-05-09 Matthew Malcomson <matthew.malcomson@arm.com> * aarch64-tbl.h (aarch64_feature_sve2, aarch64_feature_sve2aes, aarch64_feature_sve2sha3, aarch64_feature_sve2sm4, aarch64_feature_sve2bitperm): New feature sets. (SVE2, SVE2_AES, SVE2_SHA3, SVE2_SM4, SVE2_BITPERM): New macros for feature set addresses. (SVE2_INSN, SVE2_INSNC, SVE2AES_INSN, SVE2SHA3_INSN, SVE2SM4_INSN, SVE2SM4_INSNC, SVE2BITPERM_INSN): New macros.
2019-05-09Use the correct names for the init and fini array start symbols in the ↵Dimitar Dimitrov2-2/+7
default Pru linker script. * scripttempl/pru.sc (__init_array_begin, __init_array_begin): Rename.
2019-05-09Automatic date update in version.inGDB Administrator1-1/+1
2019-05-09[gdb/testsuite] Fix gdb.arch/amd64-entry-value-paramref.STom de Vries2-13/+18
The file gdb.arch/amd64-entry-value-paramref.S contains a DIE for function bar: ... DIE29: .uleb128 0x2 # (DIE (0x29) DW_TAG_subprogram) .ascii "bar\0" # DW_AT_name .byte 0x1 # DW_AT_decl_file (gdb.arch/amd64-entry-value-paramref.cc) .byte 0x15 # DW_AT_decl_line .long DIE45 # DW_AT_type .byte 0x1 # DW_AT_inline ... which refers to DIE45: ... DIE45: .uleb128 0x4 # (DIE (0x45) DW_TAG_base_type) .byte 0x4 # DW_AT_byte_size .byte 0x5 # DW_AT_encoding .ascii "int\0" # DW_AT_name ... using a form DW_FORM_ref4: ... .uleb128 0x2 # (abbrev code) .uleb128 0x2e # (TAG: DW_TAG_subprogram) .byte 0x1 # DW_children_yes ... .uleb128 0x49 # (DW_AT_type) .uleb128 0x13 # (DW_FORM_ref4) ... However, the DW_FORM_ref4 is a CU-relative reference, while using a label for the value will result in a section-relative value. So, if linked in object files contain dwarf info and are placed in the .debug_info section before the compilation units generated from amd64-entry-value-paramref.S, then the referenced type is at 0x108: ... <1><108>: Abbrev Number: 4 (DW_TAG_base_type) <109> DW_AT_byte_size : 4 <10a> DW_AT_encoding : 5 (signed) <10b> DW_AT_name : int ... but the reference will point to a non-existing DIE at 0x1cf: ... <1><f0>: Abbrev Number: 2 (DW_TAG_subprogram) <f1> DW_AT_name : bar <f5> DW_AT_decl_file : 1 <f6> DW_AT_decl_line : 21 <f7> DW_AT_type : <0x1cf> <fb> DW_AT_inline : 1 (inlined) ... which happens to cause a GDB internal error described in PR23270 - "GDB internal error: dwarf2read.c:18656: internal-error: could not find partial DIE 0x1b7 in cache". Fix the invalid DWARF by making the reference value CU-relative: ... - .long DIE45 # DW_AT_type + .long DIE45 - .Ldebug_info0 # DW_AT_type ... Tested on x86_64-linux. gdb/testsuite/ChangeLog: 2019-05-09 Tom de Vries <tdevries@suse.de> * gdb.arch/amd64-entry-value-paramref.S: Make DW_FORM_ref4 references CU-relative.
2019-05-08Convert gdbtypes.c to type-safe registry APITom Tromey2-5/+10
This changes gdbtypes.c to use the type-safe registry API. gdb/ChangeLog 2019-05-08 Tom Tromey <tom@tromey.com> * gdbtypes.c (objfile_type_data): Change type. (objfile_type, _initialize_gdbtypes): Update.
2019-05-08Convert dwarf2-frame.c to type-safe registry APITom Tromey2-7/+12
This changes dwarf2-frame.c to use the type-safe registry API. gdb/ChangeLog 2019-05-08 Tom Tromey <tom@tromey.com> * dwarf2-frame.c (dwarf2_frame_objfile_data): Change type. (dwarf2_frame_find_fde, dwarf2_build_frame_info) (_initialize_dwarf2_frame): Update.
2019-05-08Convert objc-lang.c to type-safe registry APITom Tromey2-13/+9
This changes objc-lang.c to use the type-safe registry API. gdb/ChangeLog 2019-05-08 Tom Tromey <tom@tromey.com> * objc-lang.c (objc_objfile_data): Change type. (find_methods): Update. (_initialize_objc_lang): Remove.
2019-05-08Convert stabsread.c to type-safe registry APITom Tromey2-6/+10
This changes stabsread.c to use the type-safe registry API. gdb/ChangeLog 2019-05-08 Tom Tromey <tom@tromey.com> * stabsread.c (rs6000_builtin_type_data): Change type. (rs6000_builtin_type, _initialize_stabsread): Update.
2019-05-08Remove mips_pdr_dataTom Tromey2-4/+5
mips_pdr_data is unused, so this patch removes it. gdb/ChangeLog 2019-05-08 Tom Tromey <tom@tromey.com> * mips-tdep.c (mips_pdr_data): Remove. (_initialize_mips_tdep): Update.
2019-05-08Convert hppa-tdep.c to type-safe registry APITom Tromey2-10/+13
This changes hppa-tdep.c to use the type-safe registry API. gdb/ChangeLog 2019-05-08 Tom Tromey <tom@tromey.com> * hppa-tdep.c (hppa_objfile_priv_data): Change type. (hppa_init_objfile_priv_data, read_unwind_info) (find_unwind_entry, _initialize_hppa_tdep): Update.
2019-05-08Convert elfread.c to type-safe registry APITom Tromey2-10/+15
This changes elfread.c to use the type-safe registry API. This also fixes a potential memory leak, by changing the hash table so that it is no longer allocated on an obstack. gdb/ChangeLog 2019-05-08 Tom Tromey <tom@tromey.com> * elfread.c (elf_objfile_gnu_ifunc_cache_data): Change type. (elf_gnu_ifunc_record_cache): Update. Don't allocate hash table on obstack. (elf_gnu_ifunc_resolve_by_cache, _initialize_elfread): Update.
2019-05-08Convert mdebugread.c to type-safe registry APITom Tromey2-6/+10
This changes mdebugread.c to use the type-safe registry API. gdb/ChangeLog 2019-05-08 Tom Tromey <tom@tromey.com> * mdebugread.c (basic_type_data): Change type. (basic_type, _initialize_mdebugread): Update.
2019-05-08Add a noop deleterTom Tromey2-0/+11
This adds a no-op deleter, which is used in subsequent patches. gdb/ChangeLog 2019-05-08 Tom Tromey <tom@tromey.com> * common/gdb_unique_ptr.h (struct noop_deleter): New.
2019-05-08Convert nto-tdep.c to type-safe registry APITom Tromey3-35/+14
This changes nto-tdep.c to use the type-safe registry API. gdb/ChangeLog 2019-05-08 Tom Tromey <tom@tromey.com> * nto-tdep.c (nto_inferior_data_reg): Change type. (nto_inferior_data): Update. (nto_inferior_data_cleanup, nto_new_inferior_data) (_initialize_nto_tdep): Remove. * nto-tdep.h (struct nto_inferior_data): Add initializers.
2019-05-08Convert ada-lang.c to type-safe registry APITom Tromey2-47/+27
This changes ada-lang.c to use the type-safe registry API. gdb/ChangeLog 2019-05-08 Tom Tromey <tom@tromey.com> * ada-lang.c (struct ada_inferior_data): Add initializers. (ada_inferior_data): Change type. (ada_inferior_data_cleanup): Remove. (get_ada_inferior_data, ada_inferior_exit) (struct ada_pspace_data): Add initializers, destructor. (ada_pspace_data_handle): Change type. (get_ada_pspace_data): Update. (ada_pspace_data_cleanup): Remove.
2019-05-08Convert coffread.c to type-safe registry APITom Tromey2-26/+20
This changes coffread.c to use the type-safe registry API. gdb/ChangeLog 2019-05-08 Tom Tromey <tom@tromey.com> * coffread.c (struct coff_symfile_info): Add initializers. (coff_objfile_data_key): Move lower. Change type. (coff_symfile_init, coff_symfile_read, _initialize_coffread): Update. (coff_free_info): Remove.
2019-05-08Convert fbsd-tdep.c to type-safe registry APITom Tromey2-22/+17
This changes fbsd-tdep.c to use the type-safe registry API. gdb/ChangeLog 2019-05-08 Tom Tromey <tom@tromey.com> * fbsd-tdep.c (struct fbsd_pspace_data): Add initializers. (fbsd_pspace_data_handle): Move lower. Change type. (get_fbsd_pspace_data): Update. (fbsd_pspace_data_cleanup): Remove. (_initialize_fbsd_tdep): Update.
2019-05-08Convert ada-tasks.c to type-safe registry APITom Tromey2-45/+25
This changes ada-tasks.c to use the type-safe registry API. gdb/ChangeLog 2019-05-08 Tom Tromey <tom@tromey.com> * ada-tasks.c (ada_tasks_pspace_data_handle): Change type. (get_ada_tasks_pspace_data): Update. (ada_tasks_pspace_data_cleanup): Remove. (_initialize_tasks): Update. (ada_tasks_inferior_data_handle): Change type. (get_ada_tasks_inferior_data): Update. (ada_tasks_inferior_data_cleanup): Remove. (struct ada_tasks_pspace_data): Add initializers.
2019-05-08Convert probes to type-safe registry APITom Tromey8-53/+64
This changes the probes code in elfread.c to use the type-safe registry API. While doing this, I saw that the caller of get_probes owns the probes, so I went through the code and changed the vectors to store unique_ptrs, making the ownership relationship more clear. gdb/ChangeLog 2019-05-08 Tom Tromey <tom@tromey.com> * symfile.h (struct sym_probe_fns) <sym_get_probes>: Change type. * symfile-debug.c (debug_sym_get_probes): Change type. * stap-probe.c (handle_stap_probe): (stap_static_probe_ops::get_probes): Change type. * probe.h (class static_probe_ops) <get_probes>: Change type. * probe.c (class any_static_probe_ops) <get_probes>: Change type. (parse_probes_in_pspace): Update. (find_probes_in_objfile, find_probe_by_pc, collect_probes): Update. (any_static_probe_ops::get_probes): Change type. * elfread.c (elfread_data): New typedef. (probe_key): Change type. (elf_get_probes): Likewise. Update. (probe_key_free): Remove. (_initialize_elfread): Update. * dtrace-probe.c (class dtrace_static_probe_ops) <get_probes>: Change type. (dtrace_process_dof_probe, dtrace_process_dof) (dtrace_static_probe_ops::get_probe): Change type.
2019-05-08Convert xcoffread.c to type-safe registry APITom Tromey2-36/+32
This changes xcoffread.c to use the type-safe registry API. It also renames coff_symfile_info to xcoff_symfile_info, to avoid any possible ODR violation. gdb/ChangeLog 2019-05-08 Tom Tromey <tom@tromey.com> * xcoffread.c (struct xcoff_symfile_info): Rename from coff_symfile_info. Add initializers. (xcoff_objfile_data_key): Move lower. Change type. (XCOFF_DATA): Rewrite. (xcoff_free_info): Remove. (xcoff_symfile_init, _initialize_xcoffread, read_xcoff_symtab) (read_symbol, read_symbol_lineno, find_linenos, init_stringtab) (xcoff_initial_scan): Update.
2019-05-08Convert solib-svr4.c to type-safe registry APITom Tromey2-44/+45
This changes solib-svr4y.c to use the type-safe registry API. gdb/ChangeLog 2019-05-08 Tom Tromey <tom@tromey.com> * solib-svr4.c (struct svr4_info): Add initializers and destructor. <probes_table>: Now an htab_up. (solib_svr4_pspace_data): Change type. (free_probes_table): Simplify. (~svr4_info): Rename from svr4_pspace_data_cleanup. (get_svr4_info, probes_table_htab_remove_objfile_probes) (probes_table_remove_objfile_probes, register_solib_event_probe) (solib_event_probe_at, svr4_update_solib_event_breakpoint) (_initialize_svr4_solib): Update.
2019-05-08Convert remote.c to type-safe registry APITom Tromey2-22/+13
This changes remote.c to use the type-safe registry API. gdb/ChangeLog 2019-05-08 Tom Tromey <tom@tromey.com> * remote.c (remote_pspace_data): Change type. (remote_pspace_data_cleanup): Remove. (get_remote_exec_file, set_pspace_remote_exec_file) (_initialize_remote): Update.
2019-05-08Convert breakpoint.c to type-safe registry APITom Tromey2-19/+11
This changes breakpoint.c to use the type-safe registry API. gdb/ChangeLog 2019-05-08 Tom Tromey <tom@tromey.com> * breakpoint.c (breakpoint_objfile_key): Change type. (get_breakpoint_objfile_data): Update. (free_breakpoint_objfile_data): Remove. (_initialize_breakpoint): Update.
2019-05-08Convert linux-tdep.c to type-safe registry APITom Tromey2-31/+16
This changes linux-tdep.c to use the type-safe registry API. gdb/ChangeLog 2019-05-08 Tom Tromey <tom@tromey.com> * linux-tdep.c (struct linux_info): Add initializers. (linux_inferior_data): Move. Change type. (invalidate_linux_cache_inf): Update. (linux_inferior_data_cleanup): Remove. (get_linux_inferior_data, _initialize_linux_tdep): Update.
2019-05-08Convert auxv.c to type-safe registry APITom Tromey2-30/+12
This changes auxv.c to use the type-safe registry API. gdb/ChangeLog 2019-05-08 Tom Tromey <tom@tromey.com> * auxv.c (auxv_inferior_data): Move. Change type. (auxv_inferior_data_cleanup): Remove. (invalidate_auxv_cache_inf): Rewrite. (get_auxv_inferior_data, _initialize_auxv): Update.
2019-05-08Convert symfile-debug.c to type-safe registry APITom Tromey2-69/+57
This changes symfile-debug.c to use the type-safe registry API. gdb/ChangeLog 2019-05-08 Tom Tromey <tom@tromey.com> * symfile-debug.c (struct debug_sym_fns_data): Add initializers. (symfile_debug_objfile_data_key): Change type. (symfile_debug_installed, debug_qf_has_symbols) (debug_qf_find_last_source_symtab) (debug_qf_forget_cached_source_info) (debug_qf_map_symtabs_matching_filename, debug_qf_lookup_symbol) (debug_qf_print_stats, debug_qf_dump) (debug_qf_expand_symtabs_for_function) (debug_qf_expand_all_symtabs) (debug_qf_expand_symtabs_with_fullname) (debug_qf_map_matching_symbols) (debug_qf_expand_symtabs_matching) (debug_qf_find_pc_sect_compunit_symtab) (debug_qf_map_symbol_filenames) (debug_qf_find_compunit_symtab_by_address, debug_sym_get_probes) (debug_sym_new_init, debug_sym_init, debug_sym_read) (debug_sym_read_psymbols, debug_sym_finish, debug_sym_offsets) (debug_sym_read_linetable, debug_sym_relocate): Update. (symfile_debug_free_objfile): Remove. (install_symfile_debug_logging, _initialize_symfile_debug): Update.
2019-05-08Convert dwarf2_per_objfile to type-safe registry APITom Tromey3-38/+18
This changes dwarf2_per_objfile to use the type-safe registry API. This also changes dwarf2_per_objfile not to be allocated on an obstack. It seemed clearer to me to simply allocate it on the heap; and I didn't see a drawback from doing so. gdb/ChangeLog 2019-05-08 Tom Tromey <tom@tromey.com> * dwarf2read.h (struct dwarf2_per_objfile): Don't inherit from allocate_on_obstack. * dwarf2read.c (dwarf2_objfile_data_key): Change type. (get_dwarf2_per_objfile): Update. (set_dwarf2_per_objfile): Remove. (dwarf2_has_info, dwarf2_get_section_info): Update. (dwarf2_free_objfile): Remove. (_initialize_dwarf2_read): Update.
2019-05-08Convert auto-load.c to type-safe registry APITom Tromey2-38/+36
This changes auto-load.c to use the type-safe registry API. It also changes a couple of types to "bool", removing uses of "FALSE". gdb/ChangeLog 2019-05-08 Tom Tromey <tom@tromey.com> * auto-load.c (struct auto_load_pspace_info): Add destructor and initializers. <unsupported_script_warning_printed, script_not_found_warning_printed>: Now bool. (auto_load_pspace_data): Change type. (~auto_load_pspace_info): Rename from auto_load_pspace_data_cleanup. (get_auto_load_pspace_data, init_loaded_scripts_info) (clear_section_scripts, maybe_print_unsupported_script_warning) (maybe_print_script_not_found_warning, _initialize_auto_load): Update.
2019-05-08Convert objfiles.c to type-safe registry APITom Tromey2-42/+28
This changes objfiles.c to use the type-safe registry API. gdb/ChangeLog 2019-05-08 Tom Tromey <tom@tromey.com> * objfiles.c (objfile_pspace_info): Add destructor and initializers. (objfiles_pspace_data): Change type. (~objfile_pspace_info): Rename from objfiles_pspace_data_cleanup. (get_objfile_pspace_data): Update. (objfiles_bfd_data): Change type. (get_objfile_bfd_data): Update. (objfile_bfd_data_free, _initialize_objfiles): Remove.
2019-05-08Convert break-catch-syscall.c to type-safe registry APITom Tromey2-20/+13
This changes break-catch-syscall.c to use the type-safe registry API. gdb/ChangeLog 2019-05-08 Tom Tromey <tom@tromey.com> * break-catch-syscall.c (catch_syscall_inferior_data): Move. Change type. (get_catch_syscall_inferior_data): Update. (catch_syscall_inferior_data_cleanup): Remove. (_initialize_break_catch_syscall): Update.
2019-05-08Convert inflow to type-safe registry APITom Tromey2-37/+27
This changes inflow.c to use the type-safe registry API. This fixes a latent bug in swap_terminal_info, which previously said: terminal_info *info_a = (terminal_info *) inferior_data (a, inflow_inferior_data); terminal_info *info_b = (terminal_info *) inferior_data (a, inflow_inferior_data); ... both of which examine 'a'. gdb/ChangeLog 2019-05-08 Tom Tromey <tom@tromey.com> * inflow.c (struct terminal_info): Add destructor and initializers. (inflow_inferior_data): Change type. (~terminal_info): Rename from inflow_inferior_data_cleanup. (get_inflow_inferior_data, inflow_inferior_exit) (swap_terminal_info, _initialize_inflow): Update.
2019-05-08Convert target dcache to type-safe registry APITom Tromey3-27/+25
This changes the target dcache to use the type-safe registry API. gdb/ChangeLog 2019-05-08 Tom Tromey <tom@tromey.com> * target-dcache.c (target_dcache_cleanup): Remove. (target_dcache_aspace_key): Change type. (target_dcache_init_p, target_dcache_invalidate) (target_dcache_get, target_dcache_get_or_init) (_initialize_target_dcache): Update. * dcache.h (struct dcache_deleter): New.
2019-05-08Convert symbol_cache to type-safe registry APITom Tromey2-54/+34
This changes the symbol_cache to use the type-safe registry API. gdb/ChangeLog 2019-05-08 Tom Tromey <tom@tromey.com> * symtab.c (struct symbol_cache): Add destructor and initializers. (symbol_cache_key): Move. Change type. (make_symbol_cache, free_symbol_cache): Remove. (get_symbol_cache): Update. (symbol_cache_cleanup): Remove. (ALL_PSPACES, symbol_cache_flush) (maintenance_print_symbol_cache) (maintenance_print_symbol_cache_statistics, _initialize_symtab): Update.
2019-05-08Convert main_info to type-safe registry APITom Tromey2-29/+23
This changes main_info to use the type-safe registry API. gdb/ChangeLog 2019-05-08 Tom Tromey <tom@tromey.com> * symtab.c (struct main_info): Add destructor and initializers. (main_progspace_key): Move. Change type. (get_main_info): Update. (main_info_cleanup): Remove. (_initialize_symtab): Update.
2019-05-08Add a type-safe C++ interface to a registryTom Tromey2-6/+66
This changes DECLARE_REGISTRY to add a type-safe interface. This interface is a C++ class that handles the details of registering a key, and provides various useful methods, including policy-based cleanup. gdb/ChangeLog 2019-05-08 Tom Tromey <tom@tromey.com> * registry.h (DECLARE_REGISTRY): Define the _key class.
2019-05-08gdb: Merge two 'New commands' sections in NEWS fileAndrew Burgess2-9/+11
Commit 2e62ab400ff9 added a second 'New commands' section to the NEWS file, this commit merges the two together. gdb/ChangeLog: * NEWS: Merge two 'New commands' sections.
2019-05-08When debugging a mixed Ada/C program using this scenario:Xavier Roirand8-31/+207
- set print frame-arguements all - an Ada function named pck.call_me calls a C function named break_me - you put a breakpoint in break_me and the program reaches this breakpoint. Now display the backtrace: (gdb) bt #0 break_me () at [...] #1 0x000000000040243e in pck.call_me ( s={P_ARRAY = 0x7fffffffe21c, P_BOUNDS = 0x41e6e8}) at [...] whereas we should expect: (gdb) bt #0 break_me () at [...] #1 0x000000000040243e in pck.call_me (s="test") at [...] The problem is that GDB prints the S parameter in the pck.call_me Ada function using the current language, so the C one, because the program is stopped in a C function, whereas it should use the pck.call_me frame one. This behavior is ok when user manually changes the language but it's not the right one when language is auto. This patch fixes this problem so now when using auto language, all Ada frame arguments are printed using Ada like syntax when the frame is part of Ada code, even if the program is stopped in a frame using a different language. If the user explicitly sets a language (using "set language ...") then no change here, all the Ada frame arguments are printed using this language. gdb/ChangeLog: * ada-valprint.c (ada_val_print_gnat_array): Remove language parameter and use Ada language definition instead. (ada_val_print_ptr): Remove unused language parameter. (ada_val_print_num): Remove language parameter and use Ada language definition instead. (ada_val_print_enum, ada_val_print_flt): Remove unused language parameter. (ada_val_print_struct_union, ada_val_print_ref): Remove language parameter and use Ada language definition instead. (ada_val_print_1): Update all ada_val_print_xxx calls. Remove language parameter. (ada_val_print): Update ada_val_print_1 call. gdb/testsuite/ChangeLog: * gdb.ada/frame_arg_lang.exp: New testcase. * gdb.ada/frame_arg_lang/bla.adb: New file. * gdb.ada/frame_arg_lang/pck.ads: New file. * gdb.ada/frame_arg_lang/pck.adb: New file. * gdb.ada/frame_arg_lang/foo.c: New file. Tested on x86_64-linux, no regressions.
2019-05-08Change some remote.c globals to "static"Tom Tromey2-3/+9
I noticed a three globals in remote.c that could be static. This patch makes this change. gdb/ChangeLog 2019-05-08 Tom Tromey <tromey@adacore.com> * remote.c (remote_hw_watchpoint_limit) (remote_hw_watchpoint_length_limit, remote_hw_breakpoint_limit): Now static.
2019-05-08Move "watchdog" to remote.cTom Tromey4-28/+34
The "watchdog" global is only used in remote.c, so this patch moves it there and makes it static. gdb/ChangeLog 2019-05-08 Tom Tromey <tromey@adacore.com> * maint.c (_initialize_maint_cmds): Move initialization code to remote.c. (watchdog, show_watchdog): Move to remote.c. * remote.c (watchdog, show_watchdog): Move from maint.c. Make "watchdog" static. (_initialize_remote): Move initialization code from maint.c. * defs.h (watchdog): Don't declare.
2019-05-08Move interpreter_p declaration to main.hTom Tromey5-3/+12
This moves the interpreter_p declaration from defs.h to main.h. I think this makes more sense, as it is defined in main.c. Also, this declaration was in the wrong place -- between a comment and the things the comment described. gdb/ChangeLog 2019-05-08 Tom Tromey <tromey@adacore.com> * tui/tui-interp.c: Include main.h. * interps.c: Include main.h. * main.h (interpreter_p): Declare. * defs.h (interpreter_p): Don't declare.
2019-05-08Don't declare read_unsigned_leb128 in defs.hTom Tromey4-4/+9
I noticed that read_unsigned_leb128 is declared in defs.h. There's no reason this should be here, so this patch moves it to dwarf2read.h. gdb/ChangeLog 2019-05-08 Tom Tromey <tromey@adacore.com> * dwarf2loc.c: Include dwarf2read.h. * defs.h (read_unsigned_leb128): Don't declare. * dwarf2read.h (read_unsigned_leb128): Declare.