This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: RFA: Support libthread_db xregs interface


   Sender: jimb@zenia.home
   Cc: gdb-patches@sources.redhat.com
   From: Jim Blandy <jimb@redhat.com>
   Date: 25 Aug 2004 00:07:07 -0500

   Andrew Cagney <cagney@gnu.org> writes:
   > > + v:=:const struct regset *:xregs_regset:::0
   > 
   > Mark's regset change added both the "regset.h" object and the
   > regset_from_core_section architecture method.  They, together, replace
   > the old *-nat.c:fill_regset et.al. calls.
   > 
   > Can we implement the equivalent here for ptrace/thread-db?

   Not sure what you mean.  This change lets a gdbarch object specify a
   regset which the libthread_db support code will then use to read and
   write additional registers beyond those covered by gregset_t and
   fpregset_t.  So this change does provide a regset.h-style regset for
   libthread_db.  That's what you're looking for, right?

I'm not sure, but I presume Andrew is asking you to implement a
regset_from_xxx function for use by ptrace/thread-db, instead of
explicitly adding the xregset to the architecture vector.  Your
current patch leaves the supply_gregset() and supply_fpregset() calls
as they are.  That's fine for now, but in the long run they'll have to
be replaced with regset stuff too.  By using a regset_from_xxx
function we only need a single entry in the architecture vector,
instead of three (or even more).

   > > + v:=:int:xregs_size:::0
   > > + v:=:const char *:xregs_name:::0
   > 
   > I gather these were fields in the original xreg_desc object but are
   > missing from the "regset"?  Should these, instead be added to the
   > regset, or a new object extending regset created?

   I was wondering about that, too.  It'd certainly be neater.  Mark,
   what's your take on this?

Fine by me.  The name is certainly useful for printing messages in the
core case too.  The size argument might be useful too, but it should
probably be optional.  There is no use to create an object extending
the regset.  These two should just go in the exitsting regset.

Mark


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]