This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: use MIPS NewABI register names when disassembling NewABIcode
- From: cgd at broadcom dot com
- To: aoliva at redhat dot com
- Cc: "Andrew Cagney" <ac131313 at redhat dot com>,gdb-patches at sources dot redhat dot com,binutils at sources dot redhat dot com
- Date: 10 Apr 2003 23:03:09 -0700
- Subject: Re: use MIPS NewABI register names when disassembling NewABIcode
- References: <orel4diutd.fsf@free.redhat.lsd.ic.unicamp.br><3E927BCA.1080702@redhat.com><oru1d9ci9a.fsf@free.redhat.lsd.ic.unicamp.br><3E93391F.2050005@redhat.com><or1y0cbag7.fsf@free.redhat.lsd.ic.unicamp.br><3E94339A.8030405@redhat.com><ord6jtd1y2.fsf@free.redhat.lsd.ic.unicamp.br><mailpost.1050039798.9718@news-sj1-1>
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