This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH, updated] Add support for setting disassembler-options in GDB for POWER, ARM and S390
- From: Peter Bergner <bergner at vnet dot ibm dot com>
- To: Yao Qi <qiyaoltc at gmail dot com>
- Cc: gdb-patches at sourceware dot org, Alan Modra <amodra at gmail dot com>, Pedro Alves <palves at redhat dot com>, Ulrich Weigand <uweigand at de dot ibm dot com>, Eli Zaretskii <eliz at gnu dot org>, Nick Clifton <nickc at redhat dot com>, binutils <binutils at sourceware dot org>
- Date: Mon, 13 Feb 2017 11:08:30 -0600
- Subject: Re: [PATCH, updated] Add support for setting disassembler-options in GDB for POWER, ARM and S390
- Authentication-results: sourceware.org; auth=none
- References: <beb0d776-c509-ab82-755a-0b4ff8a7a41a@vnet.ibm.com> <867f4uccky.fsf@gmail.com>
One additional question for you. In the unpatched sources,
opcodes/arm-dis.c seems to prefer GCC register set names via:
/* Default to GCC register name set. */
static unsigned int regname_selected = 1;
...while gdb/arm-tdep.c seems to want STD register set names via:
/* Disassembly style to use. Default to "std" register names. */
static const char *disassembly_style;
...and...
/* Sync the opcode insn printer with our register viewer. */
parse_arm_disassembler_option ("reg-names-std");
...and...
/* When we find the default names, tell the disassembler to use
them. */
if (!strcmp (setname, "std"))
{
disassembly_style = setname;
set_arm_regname_option (i);
}
The way this is coded, reg-names-gcc will be used as the default when
we disassemble arm instructions using objdump, while GDB will default
to using reg-names-std. Is this intentional?
Peter