From: Andrew Cagney <ac131313@redhat.com>
To: Mark Kettenis <kettenis@chello.nl>
Cc: gdb-patches@sources.redhat.com
Subject: Re: Pass gdbarch, not regset, to supply regset et.al.?
Date: Fri, 21 Nov 2003 18:39:00 -0000 [thread overview]
Message-ID: <3FBE5BC4.4010409@redhat.com> (raw)
In-Reply-To: <200311211531.hALFV27t000341@elgar.kettenis.dyndns.org>
> * It's a bit of a hassle to get at the right architecture from within
> a *-nat.c module.
(it's a bit of a hassle more generally too :-) target->lwp->architecture?
> * There are cases where there are several implied architectures to
> choose from.
> * What's the implied architecture of an architecture-independent
> remote protocol? I'd like to make these register sets work for
> remote protocols too, without havong to associate some sort og
> "generic" gdbarch with it.
> > Well, you can always pass gdbarch as the description. The point is
> > that the current implementation makes it possible to pass in something
> > that isn't related to a gdbarch at all. I also think it doesn't
> > necessarily make sense to copy the i386 implementation. For SPARC I'm
> > already thinking about a somewhat different implementation.
>
> Will anyone every actually do this, or have we ended up with too much
> generality?
>
> There might be too much generality, but that's certainly better than
> too little generality. I've defenitely got the feeling that gdbarch
> gives us too little generality.
(Think yourself lucky. At one stage people were arguing that the
architecture and target vector should be combined into a single
monolythic mess :-().
"regsets" could be made more independant of gdbarch by having its own
local table and search methods:
add_corefile_regset (bfd_arch, mach, size, name, ..., method);
corefile_regset (bfd_arch, mach, name, size)
and a wrapper:
gdbarch_corefile_regset (gdbarch, name, size)
-> corefile_regset (gdbarch->bfd_arch, name, size)
Anyway, how were you thinking of doing things for the sparc?
Andrew
prev parent reply other threads:[~2003-11-21 18:39 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-11-19 19:38 Andrew Cagney
2003-11-19 21:45 ` Mark Kettenis
2003-11-19 23:28 ` Andrew Cagney
2003-11-21 15:31 ` Mark Kettenis
2003-11-21 18:39 ` 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=3FBE5BC4.4010409@redhat.com \
--to=ac131313@redhat.com \
--cc=gdb-patches@sources.redhat.com \
--cc=kettenis@chello.nl \
/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