This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: use MIPS NewABI register names when disassembling NewABIcode
At Fri, 11 Apr 2003 05:43:18 +0000 (UTC), "Alexandre Oliva" wrote:
> * mips-dis.c (_print_insn_mips): Override reg_names from
> disassembler_options.
Uh... Well... "I'm not the maintainer, but i'd say no." 8-)
Note the line:
parse_mips_dis_options (info->disassembler_options);
about 18 lines above your new lines. It already supports what you
want, but with a different syntax.
> + tm_print_insn_info.disassembler_options = "NewABI";
"gpr_names=ABI" instead, for values of ABI: 32, n32, 64.
note that, as you probably expect 32 -> oldabi and n32,64 -> newabi.
(default -> oldabi)
IMO it's best to use the correct names for ABIs (i.e., for the
above-named ones or others) so that somebody can add a new ABI easily
to "the obvious place" in GDB, and to the obvious place in the
disassembler, and the right thing should happen automatically.
(It's a real bummer that there's no existing way to return an error
for invalid disassembler options, or i would have coded in some error
reporting. 8-)
(Also note that there's also support for doing the ABI-specific FP
register names, but that's a different option because everybody refers
to them numerically anyway.)
The rest of the gdb disassembler_options setup looks compatible with
the code in the disassembler, but it was a very quick look. 8-)
chris