From: Kevin Buettner <kevinb@redhat.com>
To: Andrew Cagney <ac131313@redhat.com>
Cc: gdb-patches@sources.redhat.com
Subject: Re: [RFA] mips-tdep.c: Add dwarf/dwarf2 regnum mapping functions
Date: Fri, 07 Mar 2003 17:52:00 -0000 [thread overview]
Message-ID: <1030307175146.ZM16168@localhost.localdomain> (raw)
In-Reply-To: Andrew Cagney <ac131313@redhat.com> "Re: [RFA] mips-tdep.c: Add dwarf/dwarf2 regnum mapping functions" (Mar 7, 12:03pm)
On Mar 7, 12:03pm, Andrew Cagney wrote:
> > [Note: Irix cross some other mips target is currently broken due to
> > the fact that FP0_REGNUM is not multiarched yet.]
>
> I don't think FP0_REGNUM should be multi-arched. The only reference to
I should point out that FP0_REGNUM is already in gdbarch.h. What I meant
was that mips should be calling set_gdbarch_fp0_regnum() instead of
defining it via a macro in the tm-*.h files.
[...FP0_REGNUM reference in generic code elided]
> mips_tdep could certainly gain a local tdep->fp0_regnum though.
Did you notice the references to FP0_REGNUM in mips-linux-tdep.c and
mips-nat.c?. If we do as you suggest, an access method will need to
be added to mips-tdep.h for getting at tdep->fp0_regnum (since you
refuse to export the mips tdep struct). Also, all occurrences of
FP0_REGNUM in mips-linux-tdep.c and mips-nat.c will need to be
rewritten to use this access method.
Certainly all of this could be done, but the need to know the first
floating point register number is something that's shared among a
number of ports. Doesn't it makes sense to define (as has already
been done) a common mechanism for determining this register number
rather than letting each port develop ad hoc methods?
> > Okay?
>
> Yes, just make it a little bit more robust. The i386 does this:
>
> /* This will hopefully provoke a warning. */
> return NUM_REGS + NUM_PSEUDO_REGS;
>
> when it doesn't know what to do with a register.
Rather than hoping that returning an out of range register number will
provoke a warning (at some indeterminate point in the future),
wouldn't it be better to call complaint() directly? Or, alternatively,
define a return value (e.g. -1) which callers of *_REG_TO_REGNUM would
then check so that an appropriate complaint could be registered?
Kevin
next prev parent reply other threads:[~2003-03-07 17:52 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-03-04 21:17 Kevin Buettner
2003-03-07 17:04 ` Andrew Cagney
2003-03-07 17:52 ` Kevin Buettner [this message]
2003-03-07 18:52 ` Andrew Cagney
2003-03-11 21:22 ` Kevin Buettner
2003-03-11 22:06 ` Andrew Cagney
2003-03-07 19:13 ` Andrew Cagney
-- strict thread matches above, loose matches on Subject: below --
2003-03-31 23:11 [RFA] MIPS: Add mappings for HI and LO registers Kevin Buettner
2003-04-02 3:36 ` Andrew Cagney
2003-03-04 17:24 [RFA] mips-tdep.c: Fix printing of floats in "info all-registers" Kevin Buettner
2003-03-04 18:01 ` Andrew Cagney
2002-12-17 10:35 [patch/rfc] Add get_*() to rs6000-tdep.c Andrew Cagney
[not found] ` <ac131313@redhat.com>
2002-12-17 14:13 ` Kevin Buettner
2002-12-18 7:37 ` Andrew Cagney
2003-03-11 23:16 ` [RFA] mips-tdep.c: Add dwarf/dwarf2 regnum mapping functions Kevin Buettner
2003-03-11 23:18 ` [RFA] mips-tdep.c: Fix printing of floats in "info all-registers" Kevin Buettner
2003-04-02 5:13 ` [RFA] MIPS: Add mappings for HI and LO registers Kevin Buettner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1030307175146.ZM16168@localhost.localdomain \
--to=kevinb@redhat.com \
--cc=ac131313@redhat.com \
--cc=gdb-patches@sources.redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox