This is the mail archive of the
mailing list for the GDB project.
Re: [PATCH] Export fill_fpxregset
On Thu, Jan 10, 2002 at 11:47:26AM -0800, Michael Snyder wrote:
> Elena Zannoni wrote:
> > Sorry, but does this conflict with the extern in gregset.h?
> > extern void fill_fpxregset (gdb_fpxregset_t *fpxregs, int regno);
> > We have gdb_fpxregset_t vs. elf_fpxregset_t.
> > Should we just use one or the other?
> > I just remembered running into a similar problem some time back.
> Hmm, well since this is (currently) only used on Linux, we COULD
> just use elf_gregset_t, but I was following a precident that was
> set for gregset_t and fpregset_t, to avoid potential portability
> The types "gdb_gregset_t" and "gdb_fpregset_t" were introduced
> because there was no consistent definition across platforms for
> gregset and fpregset. Linux uses elf_fpregset, solaris uses
> prfpregset, sunos uses fpregset...
> The gregset.h header file defines a portable interface to the
> rest of gdb, which therefore does not need to know what the
> native types of fpregset etc. are.
> In this case, i386-linux-nat.c uses the native type elf_fpxregset_t,
> while the rest of gdb will use the portable type gdb_fpxregset_t.
> Since they are identical, there shouldn't be a problem.
I don't think there should be a gdb_fpxregset_t. There's no such thing
as a portable fpxregset; PowerPC is going to have a vrregset instead,
in fact. How this should be handled in generic code that wants to
manipulate regsets remains to be seen. Ideal might be a list of
available regset types in a struct somewhere.
Daniel Jacobowitz Carnegie Mellon University
MontaVista Software Debian GNU/Linux Developer