From: Andrew Cagney <ac131313@cygnus.com>
To: Daniel Jacobowitz <drow@mvista.com>
Cc: gdb@sources.redhat.com
Subject: Re: GDB broken on MIPS targets with unmarked binaries
Date: Fri, 07 Jun 2002 12:55:00 -0000 [thread overview]
Message-ID: <3D010F9F.5080304@cygnus.com> (raw)
In-Reply-To: <20020607014125.GA27272@nevyn.them.org>
>
> How about setting something in each header that redefines
> REGISTER_VIRTUAL_TYPE, instead? I think that's much clearer, and when
> we multi-arch the targets which do this it will transition more
> naturally to setting it at gdbarch_init time. gdbarch_data() is a very
> nice tool, but this is the wrong kind of nail, IMO.
>
> I'm testing this patch. Yes, it's a little bit of a step backwards for
> multi-arching, but I still think it's correct; rather than "reverse
> engineer the header files to figure out the default", let's have the
> header files tell us what it is.
>
> It works fine in my testing; OK to commit, or would you prefer a
> different way?
try something like:
-/* Do not use "TARGET_IS_MIPS64" to test the size of floating point
registers */
-#ifndef FP_REGISTER_DOUBLE
-#define FP_REGISTER_DOUBLE (REGISTER_VIRTUAL_SIZE(FP0_REGNUM) == 8)
-#endif
#define FP_REGISTER_DOUBLE mip_fp_register-double ()
mips_fp_register_double ()
{
if (current_gdbarch->tdep->fp_register_double < 0)
...->fp_register_double = REGISTER_VIRTUAL_SIZE(FP0_REGNUM) == 8;
return gdbarch->tdep->fp_register_double;
}
And:
- tdep->mips_fp_register_double = (REGISTER_VIRTUAL_SIZE
(FP0_REGNUM) == 8);
tdep->mips_fp_register_double = -1;
It delays the computation until it is needed. It also happens to keep
the old code working without having to add more macros :-)
enjoy,
Andrew
next prev parent reply other threads:[~2002-06-07 19:55 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-06-05 13:08 Daniel Jacobowitz
2002-06-05 13:44 ` Andrew Cagney
2002-06-05 14:03 ` Daniel Jacobowitz
2002-06-05 14:12 ` Daniel Jacobowitz
2002-06-05 14:41 ` Andrew Cagney
2002-06-06 18:44 ` Daniel Jacobowitz
2002-06-07 12:55 ` Andrew Cagney [this message]
2002-06-07 13:07 ` Daniel Jacobowitz
2002-06-07 13:27 ` Andrew Cagney
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=3D010F9F.5080304@cygnus.com \
--to=ac131313@cygnus.com \
--cc=drow@mvista.com \
--cc=gdb@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