From: Andrew Cagney <ac131313@cygnus.com>
To: Kevin Buettner <kevinb@redhat.com>
Cc: Elena Zannoni <ezannoni@cygnus.com>,
Michael Snyder <msnyder@cygnus.com>,
gdb-patches@sources.redhat.com
Subject: Re: [RFA] ppc: include register numbers in gdbarch_tdep structure.
Date: Mon, 10 Dec 2001 14:34:00 -0000 [thread overview]
Message-ID: <3C15387B.8010207@cygnus.com> (raw)
In-Reply-To: <1011210212045.ZM1405@ocotillo.lan>
>
> Andrew recently said the following:
>
> On paper, it should be possible to describe the entire raw regcache
> using constants. I'm finding that, in reality, until all the relevant
> framework is fleshed out (eg my regcache breakage, everything
> multi-arch) it isn't really possible. Sigh.
>
> This suggests to me that someday, though probably not very soon, it
> may indeed be possible to use actual constants. As you can probably
> tell, I really, really hate the overhead of a function call to provide
> the value of something that ought to be a constant.
Hmm, something else we're doing is moving away from the assumption that
there is a global current_gdbarch. Consequently the macro should be
parameterized vis:
#define PPC_MQ_REGNUM(ARCH) (gdbarch_tdep ((ARCH))->ppc_mq_regnum)
As for other alternatives, I used something like:
{
const struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
....
... tdep->ppc_mq_regnum ...
....
}
in remote.c. Still, I figure this is all small fish compared to the
possability of actually fixing GDB's thread and frame code so that more
than one instance was available and thus we dramatically cut down on the
number of system / remote calls - which are the real killer.
BTW, even if GDB did support macro's I'd still argue agains them - call
by name semantics for instance. They just sux.
enjoy,
Andrew
prev parent reply other threads:[~2001-12-10 22:34 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-12-09 11:58 Elena Zannoni
2001-12-09 13:24 ` Kevin Buettner
2001-12-09 13:38 ` Elena Zannoni
2001-12-09 15:09 ` Andrew Cagney
2001-12-12 12:16 ` Mark Kettenis
2001-12-10 11:33 ` Michael Snyder
2001-12-10 12:25 ` Kevin Buettner
2001-12-10 12:41 ` Elena Zannoni
2001-12-10 13:22 ` Kevin Buettner
2001-12-10 14:34 ` Andrew Cagney [this message]
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=3C15387B.8010207@cygnus.com \
--to=ac131313@cygnus.com \
--cc=ezannoni@cygnus.com \
--cc=gdb-patches@sources.redhat.com \
--cc=kevinb@redhat.com \
--cc=msnyder@cygnus.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