mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2025-01-06 12:09:26 +08:00
65b48a8140
This commit adds support to GDB so that it can modify the disassembler-options value that is passed to the disassembler, similar to objdump's -M option. Currently, the only supported targets are ARM, PowerPC and S/390, but adding support for a new target(s) is not difficult. include/ * dis-asm.h (disasm_options_t): New typedef. (parse_arm_disassembler_option): Remove prototype. (set_arm_regname_option): Likewise. (get_arm_regnames): Likewise. (get_arm_regname_num_options): Likewise. (disassemble_init_s390): New prototype. (disassembler_options_powerpc): Likewise. (disassembler_options_arm): Likewise. (disassembler_options_s390): Likewise. (remove_whitespace_and_extra_commas): Likewise. (disassembler_options_cmp): Likewise. (next_disassembler_option): New inline function. (FOR_EACH_DISASSEMBLER_OPTION): New macro. opcodes/ * disassemble.c Include "safe-ctype.h". (disassemble_init_for_target): Handle s390 init. (remove_whitespace_and_extra_commas): New function. (disassembler_options_cmp): Likewise. * arm-dis.c: Include "libiberty.h". (NUM_ELEM): Delete. (regnames): Use long disassembler style names. Add force-thumb and no-force-thumb options. (NUM_ARM_REGNAMES): Rename from this... (NUM_ARM_OPTIONS): ...to this. Use ARRAY_SIZE. (get_arm_regname_num_options): Delete. (set_arm_regname_option): Likewise. (get_arm_regnames): Likewise. (parse_disassembler_options): Likewise. (parse_arm_disassembler_option): Rename from this... (parse_arm_disassembler_options): ...to this. Make static. Use new FOR_EACH_DISASSEMBLER_OPTION macro to scan over options. (print_insn): Use parse_arm_disassembler_options. (disassembler_options_arm): New function. (print_arm_disassembler_options): Handle updated regnames. * ppc-dis.c: Include "libiberty.h". (ppc_opts): Add "32" and "64" entries. (ppc_parse_cpu): Use ARRAY_SIZE and disassembler_options_cmp. (powerpc_init_dialect): Add break to switch statement. Use new FOR_EACH_DISASSEMBLER_OPTION macro. (disassembler_options_powerpc): New function. (print_ppc_disassembler_options): Use ARRAY_SIZE. Remove printing of "32" and "64". * s390-dis.c: Include "libiberty.h". (init_flag): Remove unneeded variable. (struct s390_options_t): New structure type. (options): New structure. (init_disasm): Rename from this... (disassemble_init_s390): ...to this. Add initializations for current_arch_mask and option_use_insn_len_bits_p. Remove init_flag. (print_insn_s390): Delete call to init_disasm. (disassembler_options_s390): New function. (print_s390_disassembler_options): Print using information from struct 'options'. * po/opcodes.pot: Regenerate. binutils/ * objdump.c (main): Use remove_whitespace_and_extra_commas. gdb/ * NEWS: Mention new set/show disassembler-options commands. * doc/gdb.texinfo: Document new set/show disassembler-options commands. * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h". (prospective_options): New static variable. (gdb_disassembler::gdb_disassembler): Initialize m_di.disassembler_options. (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options. (get_disassembler_options): New function. (set_disassembler_options): Likewise. (set_disassembler_options_sfunc): Likewise. (show_disassembler_options_sfunc): Likewise. (disassembler_options_completer): Likewise. (_initialize_disasm): Likewise. * disasm.h (get_disassembler_options): New prototype. (set_disassembler_options): Likewise. * gdbarch.sh (gdbarch_disassembler_options): New variable. (gdbarch_verify_disassembler_options): Likewise. * gdbarch.c: Regenerate. * gdbarch.h: Likewise. * arm-tdep.c (num_disassembly_options): Delete. (set_disassembly_style): Likewise. (arm_disassembler_options): New static variable. (set_disassembly_style_sfunc): Convert short style name into long option name. Call set_disassembler_options. (show_disassembly_style_sfunc): New function. (arm_gdbarch_init): Call set_gdbarch_disassembler_options and set_gdbarch_verify_disassembler_options. (_initialize_arm_tdep): Delete regnames variable and update callers. (arm_disassembler_options): Initialize. (disasm_options): New variable. (num_disassembly_options): Rename from this... (num_disassembly_styles): ...to this. Compute by scanning through disasm_options. (valid_disassembly_styles): Initialize using disasm_options. Remove calls to parse_arm_disassembler_option, get_arm_regnames and set_arm_regname_option. Pass show_disassembly_style_sfunc to the "disassembler" setshow command. * rs6000-tdep.c (powerpc_disassembler_options): New static variable. (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and set_gdbarch_verify_disassembler_options. * s390-tdep.c (s390_disassembler_options): New static variable. (s390_gdbarch_init):all set_gdbarch_disassembler_options and set_gdbarch_verify_disassembler_options. gdb/testsuite/ * gdb.arch/powerpc-power.exp: Delete test. * gdb.arch/powerpc-power.s: Likewise. * gdb.disasm/disassembler-options.exp: New test. * gdb.arch/powerpc-altivec.exp: Likewise. * gdb.arch/powerpc-altivec.s: Likewise. * gdb.arch/powerpc-altivec2.exp: Likewise. * gdb.arch/powerpc-altivec2.s: Likewise. * gdb.arch/powerpc-altivec3.exp: Likewise. * gdb.arch/powerpc-altivec3.s: Likewise. * gdb.arch/powerpc-power7.exp: Likewise. * gdb.arch/powerpc-power7.s: Likewise. * gdb.arch/powerpc-power8.exp: Likewise. * gdb.arch/powerpc-power8.s: Likewise. * gdb.arch/powerpc-power9.exp: Likewise. * gdb.arch/powerpc-power9.s: Likewise. * gdb.arch/powerpc-vsx.exp: Likewise. * gdb.arch/powerpc-vsx.s: Likewise. * gdb.arch/powerpc-vsx2.exp: Likewise. * gdb.arch/powerpc-vsx2.s: Likewise. * gdb.arch/powerpc-vsx3.exp: Likewise. * gdb.arch/powerpc-vsx3.s: Likewise. * gdb.arch/arm-disassembler-options.exp: Likewise. * gdb.arch/powerpc-disassembler-options.exp: Likewise. * gdb.arch/s390-disassembler-options.exp: Likewise.
140 lines
4.2 KiB
Plaintext
140 lines
4.2 KiB
Plaintext
2017-02-28 Peter Bergner <bergner@vnet.ibm.com>
|
||
|
||
* dis-asm.h (disasm_options_t): New typedef.
|
||
(parse_arm_disassembler_option): Remove prototype.
|
||
(set_arm_regname_option): Likewise.
|
||
(get_arm_regnames): Likewise.
|
||
(get_arm_regname_num_options): Likewise.
|
||
(disassemble_init_s390): New prototype.
|
||
(disassembler_options_powerpc): Likewise.
|
||
(disassembler_options_arm): Likewise.
|
||
(disassembler_options_s390): Likewise.
|
||
(remove_whitespace_and_extra_commas): Likewise.
|
||
(disassembler_options_cmp): Likewise.
|
||
(next_disassembler_option): New inline function.
|
||
(FOR_EACH_DISASSEMBLER_OPTION): New macro.
|
||
|
||
2017-02-28 Alan Modra <amodra@gmail.com>
|
||
|
||
* elf/ppc64.h (R_PPC64_16DX_HA): New. Expand fake reloc comment.
|
||
* elf/ppc.h (R_PPC_16DX_HA): Likewise.
|
||
|
||
2017-02-24 Richard Sandiford <richard.sandiford@arm.com>
|
||
|
||
* opcode/aarch64.h (AARCH64_OPND_SVE_ADDR_RI_S4x16)
|
||
(AARCH64_OPND_SVE_IMM_ROT1, AARCH64_OPND_SVE_IMM_ROT2)
|
||
(AARCH64_OPND_SVE_Zm3_INDEX, AARCH64_OPND_SVE_Zm3_22_INDEX)
|
||
(AARCH64_OPND_SVE_Zm4_INDEX): New aarch64_opnds.
|
||
|
||
2017-02-24 Richard Sandiford <richard.sandiford@arm.com>
|
||
|
||
* opcode/aarch64.h (AARCH64_FEATURE_COMPNUM): New macro.
|
||
(AARCH64_ARCH_V8_3): Include AARCH64_FEATURE_COMPNUM.
|
||
|
||
2017-02-22 Andrew Waterman <andrew@sifive.com>
|
||
|
||
* opcode/riscv-opc.h (CSR_SCOUNTEREN): New define.
|
||
(CSR_MCOUNTEREN): Likewise.
|
||
(scounteren): Declare register.
|
||
(mcounteren): Likewise.
|
||
|
||
2017-02-14 Andrew Waterman <andrew@sifive.com>
|
||
|
||
* opcode/riscv-opc.h (MATCH_SFENCE_VMA): New define.
|
||
(MASK_SFENCE_VMA): Likewise.
|
||
(sfence_vma): Declare instruction.
|
||
|
||
2017-02-14 Alan Modra <amodra@gmail.com>
|
||
|
||
PR 21118
|
||
* opcode/ppc.h (PPC_OPERAND_*): Reassign values, regs first.
|
||
(PPC_OPERAND_SPR, PPC_OPERAND_GQR): Define.
|
||
|
||
2017-01-24 Dimitar Dimitrov <dimitar@dinux.eu>
|
||
|
||
* opcode/hppa.h: Clarify that file is part of GNU opcodes.
|
||
* opcode/i860.h: Ditto.
|
||
* opcode/nios2.h: Ditto.
|
||
* opcode/nios2r1.h: Ditto.
|
||
* opcode/nios2r2.h: Ditto.
|
||
* opcode/pru.h: Ditto.
|
||
|
||
2017-01-24 Alan Hayward <alan.hayward@arm.com>
|
||
|
||
* elf/common.h (NT_ARM_SVE): Define.
|
||
|
||
2017-01-04 Jiong Wang <jiong.wang@arm.com>
|
||
|
||
* dwarf2.def: Sync with mainline gcc sources.
|
||
|
||
2017-01-04 Richard Earnshaw <rearnsha@arm.com>
|
||
Jiong Wang <jiong.wang@arm.com>
|
||
|
||
* dwarf2.def (DW_OP_AARCH64_operation): Reserve the number 0xea.
|
||
(DW_CFA_GNU_window_save): Comments the multiplexing on AArch64.
|
||
|
||
2017-01-04 Szabolcs Nagy <szabolcs.nagy@arm.com>
|
||
|
||
* opcode/aarch64.h (AARCH64_FEATURE_RCPC): Define.
|
||
(AARCH64_ARCH_V8_3): Update.
|
||
|
||
2017-01-03 Kito Cheng <kito.cheng@gmail.com>
|
||
|
||
* opcode/riscv-opc.h: Add support for the "q" ISA extension.
|
||
|
||
2017-01-03 Nick Clifton <nickc@redhat.com>
|
||
|
||
* dwarf2.def: Sync with mainline gcc sources
|
||
* dwarf2.h: Likewise.
|
||
|
||
2016-12-21 Jakub Jelinek <jakub@redhat.com>
|
||
|
||
* dwarf2.def (DW_FORM_ref_sup): Renamed to ...
|
||
(DW_FORM_ref_sup4): ... this. New form.
|
||
(DW_FORM_ref_sup8): New form.
|
||
|
||
2016-10-17 Jakub Jelinek <jakub@redhat.com>
|
||
|
||
* dwarf2.h (enum dwarf_calling_convention): Add new DWARF5
|
||
calling convention codes.
|
||
(enum dwarf_line_number_content_type): New.
|
||
(enum dwarf_location_list_entry_type): Add DWARF5 DW_LLE_*
|
||
codes.
|
||
(enum dwarf_source_language): Add new DWARF5 DW_LANG_* codes.
|
||
(enum dwarf_macro_record_type): Add DWARF5 DW_MACRO_* codes.
|
||
(enum dwarf_name_index_attribute): New.
|
||
(enum dwarf_range_list_entry): New.
|
||
(enum dwarf_unit_type): New.
|
||
* dwarf2.def: Add new DWARF5 DW_TAG_*, DW_FORM_*, DW_AT_*,
|
||
DW_OP_* and DW_ATE_* entries.
|
||
|
||
2016-08-15 Jakub Jelinek <jakub@redhat.com>
|
||
|
||
* dwarf2.def (DW_AT_string_length_bit_size,
|
||
DW_AT_string_length_byte_size): New attributes.
|
||
|
||
2016-08-12 Alexandre Oliva <aoliva@redhat.com>
|
||
|
||
PR debug/63240
|
||
* dwarf2.def (DW_AT_deleted, DW_AT_defaulted): New.
|
||
* dwarf2.h (enum dwarf_defaulted_attribute): New.
|
||
|
||
2017-01-02 Alan Modra <amodra@gmail.com>
|
||
|
||
Update year range in copyright notice of all files.
|
||
|
||
For older changes see ChangeLog-2016
|
||
|
||
Copyright (C) 2017 Free Software Foundation, Inc.
|
||
|
||
Copying and distribution of this file, with or without modification,
|
||
are permitted in any medium without royalty provided the copyright
|
||
notice and this notice are preserved.
|
||
|
||
Local Variables:
|
||
mode: change-log
|
||
left-margin: 8
|
||
fill-column: 74
|
||
version-control: never
|
||
End:
|