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


This patch adds support to GDB for the libthread_db 'xregs' functions,
which allow registers not present in 'gregset_t' or 'fpregset_t' to be
passed through libthread_db.  The contents of the 'xregs' register set
is not specified by GDB; the libthread_db client can specify whatever
size it likes, and libthread_db will pass it through unchanged.

I'll post a second patch which defines an 'xregs' register set for the
PowerPC E500 SPE registers.

At present, the GNU C library's libthread_db's xregs functions are
stubbed out; I also have a patch to glibc to implement them, which
I'll be submitting.  If GDB loads a libthread_db that does not
implement the xregs functions, this patch handles that case.

These have all been tested on E500 powerpc-unknown-linux-gnu and on
i686-pc-linux-gnu (where they should have no effect).

This patch should allow us to remove the call to dummy_sse_values in
supply_fpregset.  Not that that call is especially necessary or
helpful at the moment anyway, as far as I can tell.

This patch was originally posted here:
http://sources.redhat.com/ml/gdb-patches/2004-03/msg00571.html

I believe it's been revised to implement the suggestions made there.

[...]


+ 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?

--

Instead of:
+           if (! warned_xregs_not_implemented)
+             {
+               warning ("thread debugging library is too old to access "
+                        "%s registers.",
+                        gdbarch_xregs_name (current_gdbarch));
can we use "complaint". That "thread" should be "Thread".

--

+ 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?


Andrew



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