[PATCH]: Messy prototypes for supply_gregset and friends.

Mark Kettenis kettenis@wins.uva.nl
Thu May 25 12:49:00 GMT 2000


   Date: Thu, 25 May 2000 11:24:32 -0700
   From: Michael Snyder <msnyder@cygnus.com>

   Mark Kettenis wrote:

   >    Most use gregset_t and fpregset_t -- but Solaris uses
   >    prgregset_t and prfpregset_t, and at least one Linux (i386)
   >    uses elf_gregset_t and elf_fpregset_t.
   > 
   >    This makes it hard to prototype the functions.  Procfs has used an
   >    ugly workaround involving ifdefs and typedefs and autoconf.  Everybody
   >    else just lets it slide.  This situation has existed long enough.
   > 
   > Using autoconf isn't such a bad idea.

   I think it's overkill for this application.  All we really need is eg.
	   #define GDB_GREGSET_T elf_gregset_t
   in two or three nm.h files.

The idea of Doing it with autoconf is that future targets will get it
right without having to add something to the nm.h files.

   Besides, I can do this easily while autoconf would be hard (for me).
   If you want to do it, feel free!   ;-)

OK, go ahead (the easy way I mean, without autoconf).  I'll probably
need to tweak things a bit for the i386 ELF BSD's in the near future.
Perhaps I'll add the autoconf stuff then.

   >    I propose a new file, "gregset.h", which will contain prototypes 
   > 
   > I'd prefer regset.h, or gdb-regset.h.  The `g' in gregset stands for
   > "general purpose" but the file will also contain definitions for
   > floating-point registers.

   Umm... I'm viewing them as a family.  "regset.h" is definitely
   too broad.  I could live with gdb-regset.h but it seems more
   obscure than gregset.h, which tells you exactly what the file
   is "about".  Is this issue important to you?

On second thought, gregset.h is likely to cause less confusion.  Sorry
to have bothered you with it.

Anyway, thanks for cleanup up this mess.

Mark


More information about the Gdb-patches mailing list