PERFORCE change 103187 for review

Marcel Moolenaar marcel at FreeBSD.org
Fri Aug 4 19:20:39 UTC 2006


http://perforce.freebsd.org/chv.cgi?CH=103187

Change 103187 by marcel at marcel_nfs on 2006/08/04 19:20:18

	o  Replace the i386 specific get_xmmregs and set_xmmregs with
	   the generic get_xregs and set_xregs (resp).
	o  Add get_xregsize where appropriate.
	o  Even avoid using gregset_t and fpregset_t and simply use
	   struct reg and struct fpreg. This eliminates the dependency
	   on <sys/procfs.h> and allows struct reg and struct fpreg
	   to be forward declared in <thread_db.h>
	
	NOTE: The initial desire to be as compatible to Sun & Linux
	has been relaxed because there doesn't seem to be any desire
	for compatibility. Solaris 10 even changed libthread_db to
	libc_db. We just follow as closely as possible so that the
	generic programming model matches. This should allow GDB to
	unify their code with only limited glueing. Such glueing is
	effecively already there as they define gdb_gregset_t and
	gdb_fpregset_t for that exact purpose. The default for said
	definitions is struct reg and struct fpreg (resp), so we're
	doing exactly the right thing.
	The upshot for us that that we don't pollute our sources
	with unnecessary SysV-isms, Sun-isms and/or Linux-isms, nor
	with their mistakes.  It has only bought us confusion if there
	was anything we got back for it. 

Affected files ...

.. //depot/projects/gdb/lib/libthread_db/Symbol.map#2 edit
.. //depot/projects/gdb/lib/libthread_db/arch/alpha/libc_r_md.c#4 edit
.. //depot/projects/gdb/lib/libthread_db/arch/amd64/libc_r_md.c#3 edit
.. //depot/projects/gdb/lib/libthread_db/arch/i386/libc_r_md.c#5 edit
.. //depot/projects/gdb/lib/libthread_db/arch/ia64/libc_r_md.c#3 edit
.. //depot/projects/gdb/lib/libthread_db/arch/sparc64/libc_r_md.c#3 edit
.. //depot/projects/gdb/lib/libthread_db/libc_r_db.c#8 edit
.. //depot/projects/gdb/lib/libthread_db/libpthread_db.c#7 edit
.. //depot/projects/gdb/lib/libthread_db/libpthread_db.h#4 edit
.. //depot/projects/gdb/lib/libthread_db/libthr_db.c#8 edit
.. //depot/projects/gdb/lib/libthread_db/thread_db.c#7 edit
.. //depot/projects/gdb/lib/libthread_db/thread_db.h#11 edit
.. //depot/projects/gdb/lib/libthread_db/thread_db_int.h#9 edit

Differences ...

==== //depot/projects/gdb/lib/libthread_db/Symbol.map#2 (text) ====

@@ -20,11 +20,12 @@
 	td_thr_get_info;
 	td_thr_getfpregs;
 	td_thr_getgregs;
-	td_thr_getxmmregs;	# x86 only
+	td_thr_getxregs;
+	td_thr_getxregsize;
 	td_thr_set_event;
 	td_thr_setfpregs;
 	td_thr_setgregs;
-	td_thr_setxmmregs;	# x86 only
+	td_thr_setxregs;
 	td_thr_sstep;		# FreeBSD extension to GDB<->thread interface
 	td_thr_tls_get_addr;
 	td_thr_validate;

==== //depot/projects/gdb/lib/libthread_db/arch/alpha/libc_r_md.c#4 (text+ko) ====

@@ -31,7 +31,7 @@
 #include <machine/setjmp.h>
 
 void
-libc_r_md_getgregs(jmp_buf jb, gregset_t *r)
+libc_r_md_getgregs(jmp_buf jb, struct reg *r)
 {
 	r->r_regs[R_V0] = jb->_jb[4];
 	r->r_regs[R_T0] = jb->_jb[5];
@@ -68,6 +68,6 @@
 }
 
 void
-libc_r_md_getfpregs(jmp_buf jb, fpregset_t *r)
+libc_r_md_getfpregs(jmp_buf jb, struct fpreg *r)
 {
 }

==== //depot/projects/gdb/lib/libthread_db/arch/amd64/libc_r_md.c#3 (text+ko) ====

@@ -31,11 +31,11 @@
 #include <machine/setjmp.h>
 
 void
-libc_r_md_getgregs(jmp_buf jb, gregset_t *r)
+libc_r_md_getgregs(jmp_buf jb, struct reg *r)
 {
 }
 
 void
-libc_r_md_getfpregs(jmp_buf jb, fpregset_t *r)
+libc_r_md_getfpregs(jmp_buf jb, struct fpreg *r)
 {
 }

==== //depot/projects/gdb/lib/libthread_db/arch/i386/libc_r_md.c#5 (text+ko) ====

@@ -31,7 +31,7 @@
 #include <machine/setjmp.h>
 
 void
-libc_r_md_getgregs(jmp_buf jb, gregset_t *r)
+libc_r_md_getgregs(jmp_buf jb, struct reg *r)
 {
 	r->r_eip = jb->_jb[0];
 	r->r_ebx = jb->_jb[1];
@@ -43,6 +43,6 @@
 }
 
 void
-libc_r_md_getfpregs(jmp_buf jb, fpregset_t *r)
+libc_r_md_getfpregs(jmp_buf jb, struct fpreg *r)
 {
 }

==== //depot/projects/gdb/lib/libthread_db/arch/ia64/libc_r_md.c#3 (text+ko) ====

@@ -31,11 +31,11 @@
 #include <machine/setjmp.h>
 
 void
-libc_r_md_getgregs(jmp_buf jb, gregset_t *r)
+libc_r_md_getgregs(jmp_buf jb, struct reg *r)
 {
 }
 
 void
-libc_r_md_getfpregs(jmp_buf jb, fpregset_t *r)
+libc_r_md_getfpregs(jmp_buf jb, struct fpreg *r)
 {
 }

==== //depot/projects/gdb/lib/libthread_db/arch/sparc64/libc_r_md.c#3 (text+ko) ====

@@ -31,11 +31,11 @@
 #include <machine/setjmp.h>
 
 void
-libc_r_md_getgregs(jmp_buf jb, gregset_t *r)
+libc_r_md_getgregs(jmp_buf jb, struct reg *r)
 {
 }
 
 void
-libc_r_md_getfpregs(jmp_buf jb, fpregset_t *r)
+libc_r_md_getfpregs(jmp_buf jb, struct fpreg *r)
 {
 }

==== //depot/projects/gdb/lib/libthread_db/libc_r_db.c#8 (text+ko) ====

@@ -35,8 +35,8 @@
 
 #include "thread_db_int.h"
 
-void libc_r_md_getfpregs(jmp_buf jb, fpregset_t *);
-void libc_r_md_getgregs(jmp_buf jb, gregset_t *);
+void libc_r_md_getfpregs(jmp_buf jb, struct fpreg *);
+void libc_r_md_getgregs(jmp_buf jb, struct reg *);
 
 struct td_thragent {
 	TD_THRAGENT_FIELDS;
@@ -228,16 +228,20 @@
 	return ((err == PS_OK) ? TD_OK : TD_ERR);
 }
 
-#ifdef __i386__
+static td_err_e
+libc_r_db_thr_getxregs(const td_thrhandle_t *th, void *xregs)
+{
+	return (TD_NOXREGS);
+}
+
 static td_err_e
-libc_r_db_thr_getxmmregs(const td_thrhandle_t *th, char *fxsave)
+libc_r_db_thr_getxregsize(const td_thrhandle_t *th, int *szp)
 {
-	return (TD_NOFPREGS);
+	return (TD_NOXREGS);
 }
-#endif
 
 static td_err_e
-libc_r_db_thr_getfpregs(const td_thrhandle_t *th, fpregset_t *r)
+libc_r_db_thr_getfpregs(const td_thrhandle_t *th, struct fpreg *r)
 {
 	jmp_buf jb;
 	const td_thragent_t *ta;
@@ -262,7 +266,7 @@
 }
 
 static td_err_e
-libc_r_db_thr_getgregs(const td_thrhandle_t *th, gregset_t *r)
+libc_r_db_thr_getgregs(const td_thrhandle_t *th, struct reg *r)
 {
 	jmp_buf jb;
 	const td_thragent_t *ta;
@@ -292,22 +296,20 @@
 	return (0);
 }
 
-#ifdef __i386__
 static td_err_e
-libc_r_db_thr_setxmmregs(const td_thrhandle_t *th, const char *fxsave)
+libc_r_db_thr_setxregs(const td_thrhandle_t *th, const void *xregs)
 {
-	return (TD_NOFPREGS);
+	return (TD_NOXREGS);
 }
-#endif
 
 static td_err_e
-libc_r_db_thr_setfpregs(const td_thrhandle_t *th, const fpregset_t *r)
+libc_r_db_thr_setfpregs(const td_thrhandle_t *th, const struct fpreg *r)
 {
 	return (TD_ERR);
 }
 
 static td_err_e
-libc_r_db_thr_setgregs(const td_thrhandle_t *th, const gregset_t *r)
+libc_r_db_thr_setgregs(const td_thrhandle_t *th, const struct reg *r)
 {
 	return (TD_ERR);
 }
@@ -337,12 +339,11 @@
 	.to_thr_get_info        = libc_r_db_thr_get_info,
 	.to_thr_getfpregs       = libc_r_db_thr_getfpregs,
 	.to_thr_getgregs        = libc_r_db_thr_getgregs,
+	.to_thr_getxregs	= libc_r_db_thr_getxregs,
+	.to_thr_getxregsize	= libc_r_db_thr_getxregsize,
 	.to_thr_set_event       = libc_r_db_thr_set_event,
 	.to_thr_setfpregs       = libc_r_db_thr_setfpregs,
 	.to_thr_setgregs        = libc_r_db_thr_setgregs,
+	.to_thr_setxregs	= libc_r_db_thr_setxregs,
 	.to_thr_validate        = libc_r_db_thr_validate,
-#ifdef __i386__
-	.to_thr_getxmmregs	= libc_r_db_thr_getxmmregs,
-	.to_thr_setxmmregs	= libc_r_db_thr_setxmmregs,
-#endif
 };

==== //depot/projects/gdb/lib/libthread_db/libpthread_db.c#7 (text+ko) ====

@@ -218,7 +218,7 @@
 static td_err_e
 pt_ta_map_id2thr(const td_thragent_t *ta, thread_t id, td_thrhandle_t *th)
 {
-	gregset_t gregs;
+	struct reg gregs;
 	TAILQ_HEAD(, pthread) thread_list;
 	psaddr_t pt, tcb_addr;
 	lwpid_t lwp;
@@ -678,9 +678,14 @@
 	return (0);
 }
 
-#ifdef __i386__
+static td_err_e
+pt_thr_getxregsize(const td_thrhandle_t *th, int *sizep)
+{
+	return (TD_NOXREGS);
+}
+
 static td_err_e
-pt_thr_getxmmregs(const td_thrhandle_t *th, char *fxsave)
+pt_thr_getxregs(const td_thrhandle_t *th, void *xregs)
 {
 	const td_thragent_t *ta = th->th_ta;
 	struct kse_thr_mailbox tmbx;
@@ -697,7 +702,7 @@
 		return (ret);
 
 	if (ta->map[th->th_tid].type == PT_LWP) {
-		ret = ps_lgetxmmregs(ta->ph, ta->map[th->th_tid].lwp, fxsave);
+		ret = ps_lgetxregs(ta->ph, ta->map[th->th_tid].lwp, xregs);
 		return (P2T(ret));
 	}
 
@@ -711,20 +716,19 @@
 	if (ret != 0)
 		return (P2T(ret));
 	if (lwp != 0) {
-		ret = ps_lgetxmmregs(ta->ph, lwp, fxsave);
+		ret = ps_lgetxregs(ta->ph, lwp, xregs);
 		return (P2T(ret));
 	}
 
 	ret = ps_pread(ta->ph, tmbx_addr, &tmbx, sizeof(tmbx));
 	if (ret != 0)
 		return (P2T(ret));
-	pt_ucontext_to_fxsave(&tmbx.tm_context, fxsave);
+	pt_ucontext_to_xreg(&tmbx.tm_context, xregs);
 	return (0);
 }
-#endif
 
 static td_err_e
-pt_thr_getfpregs(const td_thrhandle_t *th, fpregset_t *fpregs)
+pt_thr_getfpregs(const td_thrhandle_t *th, struct fpreg *fpregs)
 {
 	const td_thragent_t *ta = th->th_ta;
 	struct kse_thr_mailbox tmbx;
@@ -765,7 +769,7 @@
 }
 
 static td_err_e
-pt_thr_getgregs(const td_thrhandle_t *th, gregset_t *gregs)
+pt_thr_getgregs(const td_thrhandle_t *th, struct reg *gregs)
 {
 	const td_thragent_t *ta = th->th_ta;
 	struct kse_thr_mailbox tmbx;
@@ -805,9 +809,8 @@
 	return (0);
 }
 
-#ifdef __i386__
 static td_err_e
-pt_thr_setxmmregs(const td_thrhandle_t *th, const char *fxsave)
+pt_thr_setxregs(const td_thrhandle_t *th, const void *xregs)
 {
 	const td_thragent_t *ta = th->th_ta;
 	struct kse_thr_mailbox tmbx;
@@ -824,7 +827,7 @@
 		return (ret);
 
 	if (ta->map[th->th_tid].type == PT_LWP) {
-		ret = ps_lsetxmmregs(ta->ph, ta->map[th->th_tid].lwp, fxsave);
+		ret = ps_lsetxregs(ta->ph, ta->map[th->th_tid].lwp, xregs);
 		return (P2T(ret));
 	}
 
@@ -839,7 +842,7 @@
 	if (ret != 0)
 		return (P2T(ret));
 	if (lwp != 0) {
-		ret = ps_lsetxmmregs(ta->ph, lwp, fxsave);
+		ret = ps_lsetxregs(ta->ph, lwp, xregs);
 		return (P2T(ret));
 	}
 	/*
@@ -850,14 +853,13 @@
 	if (ret != 0)
 		return (P2T(ret));
 
-	pt_fxsave_to_ucontext(fxsave, &tmbx.tm_context);
+	pt_xreg_to_ucontext(xregs, &tmbx.tm_context);
 	ret = ps_pwrite(ta->ph, tmbx_addr, &tmbx, sizeof(tmbx));
 	return (P2T(ret));
 }
-#endif
 
 static td_err_e
-pt_thr_setfpregs(const td_thrhandle_t *th, const fpregset_t *fpregs)
+pt_thr_setfpregs(const td_thrhandle_t *th, const struct fpreg *fpregs)
 {
 	const td_thragent_t *ta = th->th_ta;
 	struct kse_thr_mailbox tmbx;
@@ -904,7 +906,7 @@
 }
 
 static td_err_e
-pt_thr_setgregs(const td_thrhandle_t *th, const gregset_t *gregs)
+pt_thr_setgregs(const td_thrhandle_t *th, const struct reg *gregs)
 {
 	const td_thragent_t *ta = th->th_ta;
 	struct kse_thr_mailbox tmbx;
@@ -1134,16 +1136,15 @@
 	.to_thr_get_info	= pt_thr_get_info,
 	.to_thr_getfpregs	= pt_thr_getfpregs,
 	.to_thr_getgregs	= pt_thr_getgregs,
+	.to_thr_getxregs	= pt_thr_getxregs,
+	.to_thr_getxregsize	= pt_thr_getxregsize,
 	.to_thr_set_event	= pt_thr_set_event,
 	.to_thr_setfpregs	= pt_thr_setfpregs,
 	.to_thr_setgregs	= pt_thr_setgregs,
+	.to_thr_setxregs	= pt_thr_setxregs,
 	.to_thr_validate	= pt_thr_validate,
 	.to_thr_tls_get_addr	= pt_thr_tls_get_addr,
 
 	/* FreeBSD specific extensions. */
 	.to_thr_sstep		= pt_thr_sstep,
-#ifdef __i386__
-	.to_thr_getxmmregs	= pt_thr_getxmmregs,
-	.to_thr_setxmmregs	= pt_thr_setxmmregs,
-#endif
 };

==== //depot/projects/gdb/lib/libthread_db/libpthread_db.h#4 (text+ko) ====

@@ -84,10 +84,9 @@
 void pt_ucontext_to_reg(const ucontext_t *, struct reg *);
 void pt_fpreg_to_ucontext(const struct fpreg *, ucontext_t *);
 void pt_ucontext_to_fpreg(const ucontext_t *, struct fpreg *);
-#ifdef __i386__
-void pt_fxsave_to_ucontext(const char *, ucontext_t *);
-void pt_ucontext_to_fxsave(const ucontext_t *, char *);
-#endif
+void pt_xreg_to_ucontext(const void *, ucontext_t *);
+void pt_ucontext_to_xreg(const ucontext_t *, void *);
+
 int  pt_reg_sstep(struct reg *reg, int step);
 
 #endif /* _LIBPTHREAD_DB_H_ */

==== //depot/projects/gdb/lib/libthread_db/libthr_db.c#8 (text+ko) ====

@@ -513,9 +513,14 @@
 	return (0);
 }
 
-#ifdef __i386__
+static td_err_e
+pt_thr_getxregsize(const td_thrhandle_t *th, int *sizep)
+{
+	return (TD_NOXREGS);
+}
+
 static td_err_e
-pt_thr_getxmmregs(const td_thrhandle_t *th, char *fxsave)
+pt_thr_getxregs(const td_thrhandle_t *th, void *xregs)
 {
 	const td_thragent_t *ta = th->th_ta;
 	int ret;
@@ -526,13 +531,12 @@
 	if (ret)
 		return (ret);
 
-	ret = ps_lgetxmmregs(ta->ph, th->th_tid, fxsave);
+	ret = ps_lgetxregs(ta->ph, th->th_tid, xregs);
 	return (P2T(ret));
 }
-#endif
 
 static td_err_e
-pt_thr_getfpregs(const td_thrhandle_t *th, fpregset_t *fpregs)
+pt_thr_getfpregs(const td_thrhandle_t *th, struct fpreg *fpregs)
 {
 	const td_thragent_t *ta = th->th_ta;
 	int ret;
@@ -548,7 +552,7 @@
 }
 
 static td_err_e
-pt_thr_getgregs(const td_thrhandle_t *th, gregset_t *gregs)
+pt_thr_getgregs(const td_thrhandle_t *th, struct reg *gregs)
 {
 	const td_thragent_t *ta = th->th_ta;
 	int ret;
@@ -563,9 +567,8 @@
 	return (P2T(ret));
 }
 
-#ifdef __i386__
 static td_err_e
-pt_thr_setxmmregs(const td_thrhandle_t *th, const char *fxsave)
+pt_thr_setxregs(const td_thrhandle_t *th, const void *xregs)
 {
 	const td_thragent_t *ta = th->th_ta;
 	int ret;
@@ -576,13 +579,12 @@
 	if (ret)
 		return (ret);
 
-	ret = ps_lsetxmmregs(ta->ph, th->th_tid, fxsave);
+	ret = ps_lsetxregs(ta->ph, th->th_tid, xregs);
 	return (P2T(ret));
 }
-#endif
 
 static td_err_e
-pt_thr_setfpregs(const td_thrhandle_t *th, const fpregset_t *fpregs)
+pt_thr_setfpregs(const td_thrhandle_t *th, const struct fpreg *fpregs)
 {
 	const td_thragent_t *ta = th->th_ta;
 	int ret;
@@ -598,7 +600,7 @@
 }
 
 static td_err_e
-pt_thr_setgregs(const td_thrhandle_t *th, const gregset_t *gregs)
+pt_thr_setgregs(const td_thrhandle_t *th, const struct reg *gregs)
 {
 	const td_thragent_t *ta = th->th_ta;
 	int ret;
@@ -778,16 +780,15 @@
 	.to_thr_get_info	= pt_thr_get_info,
 	.to_thr_getfpregs	= pt_thr_getfpregs,
 	.to_thr_getgregs	= pt_thr_getgregs,
+	.to_thr_getxregs	= pt_thr_getxregs,
+	.to_thr_getxregsize	= pt_thr_getxregsize,
 	.to_thr_set_event	= pt_thr_set_event,
 	.to_thr_setfpregs	= pt_thr_setfpregs,
 	.to_thr_setgregs	= pt_thr_setgregs,
+	.to_thr_setxregs	= pt_thr_setxregs,
 	.to_thr_validate	= pt_thr_validate,
 	.to_thr_tls_get_addr	= pt_thr_tls_get_addr,
 
 	/* FreeBSD specific extensions. */
 	.to_thr_sstep		= pt_thr_sstep,
-#ifdef __i386__
-	.to_thr_getxmmregs	= pt_thr_getxmmregs,
-	.to_thr_setxmmregs	= pt_thr_setxmmregs,
-#endif
 };

==== //depot/projects/gdb/lib/libthread_db/thread_db.c#7 (text+ko) ====

@@ -184,25 +184,29 @@
 	return (ta->ta_ops->to_thr_get_info(th, info));
 }
 
-#ifdef __i386__
 td_err_e
-td_thr_getxmmregs(const td_thrhandle_t *th, char *fxsave)
+td_thr_getxregs(const td_thrhandle_t *th, void *xreg)
 {
 	const td_thragent_t *ta = th->th_ta;
-	return (ta->ta_ops->to_thr_getxmmregs(th, fxsave));
+	return (ta->ta_ops->to_thr_getxregs(th, xreg));
 }
-#endif
 
+td_err_e
+td_thr_getxregsize(const td_thrhandle_t *th, int *sizep)
+{
+	const td_thragent_t *ta = th->th_ta;
+	return (ta->ta_ops->to_thr_getxregsize(th, sizep));
+}
 
 td_err_e
-td_thr_getfpregs(const td_thrhandle_t *th, fpregset_t *fpregset)
+td_thr_getfpregs(const td_thrhandle_t *th, struct fpreg *fpregs)
 {
 	const td_thragent_t *ta = th->th_ta;
-	return (ta->ta_ops->to_thr_getfpregs(th, fpregset));
+	return (ta->ta_ops->to_thr_getfpregs(th, fpregs));
 }
 
 td_err_e
-td_thr_getgregs(const td_thrhandle_t *th, gregset_t *gregs)
+td_thr_getgregs(const td_thrhandle_t *th, struct reg *gregs)
 {
 	const td_thragent_t *ta = th->th_ta;
 	return (ta->ta_ops->to_thr_getgregs(th, gregs));
@@ -215,24 +219,22 @@
 	return (ta->ta_ops->to_thr_set_event(th, events));
 }
 
-#ifdef __i386__
 td_err_e
-td_thr_setxmmregs(const td_thrhandle_t *th, const char *fxsave)
+td_thr_setxregs(const td_thrhandle_t *th, const void *xreg)
 {
 	const td_thragent_t *ta = th->th_ta;
-	return (ta->ta_ops->to_thr_setxmmregs(th, fxsave));
+	return (ta->ta_ops->to_thr_setxregs(th, xreg));
 }
-#endif
 
 td_err_e
-td_thr_setfpregs(const td_thrhandle_t *th, const fpregset_t *fpregs)
+td_thr_setfpregs(const td_thrhandle_t *th, const struct fpreg *fpregs)
 {
 	const td_thragent_t *ta = th->th_ta;
 	return (ta->ta_ops->to_thr_setfpregs(th, fpregs));
 }
 
 td_err_e
-td_thr_setgregs(const td_thrhandle_t *th, const gregset_t *gregs)
+td_thr_setgregs(const td_thrhandle_t *th, const struct reg *gregs)
 {
 	const td_thragent_t *ta = th->th_ta;
 	return (ta->ta_ops->to_thr_setgregs(th, gregs));

==== //depot/projects/gdb/lib/libthread_db/thread_db.h#11 (text+ko) ====

@@ -227,13 +227,13 @@
 td_err_e td_thr_event_enable(const td_thrhandle_t *, int);
 td_err_e td_thr_event_getmsg(const td_thrhandle_t *, td_event_msg_t *);
 td_err_e td_thr_get_info(const td_thrhandle_t *, td_thrinfo_t *);
-td_err_e td_thr_getfpregs(const td_thrhandle_t *, fpregset_t *);
-td_err_e td_thr_getgregs(const td_thrhandle_t *, gregset_t *);
+td_err_e td_thr_getfpregs(const td_thrhandle_t *, struct fpreg *);
+td_err_e td_thr_getgregs(const td_thrhandle_t *, struct reg *);
 td_err_e td_thr_getxregs(const td_thrhandle_t *, void *);
 td_err_e td_thr_getxregsize(const td_thrhandle_t *, int *);
 td_err_e td_thr_set_event(const td_thrhandle_t *, td_thr_events_t *);
-td_err_e td_thr_setfpregs(const td_thrhandle_t *, const fpregset_t *);
-td_err_e td_thr_setgregs(const td_thrhandle_t *, const gregset_t *);
+td_err_e td_thr_setfpregs(const td_thrhandle_t *, const struct fpreg *);
+td_err_e td_thr_setgregs(const td_thrhandle_t *, const struct reg *);
 td_err_e td_thr_setxregs(const td_thrhandle_t *, const void *);
 td_err_e td_thr_validate(const td_thrhandle_t *);
 td_err_e td_thr_tls_get_addr(const td_thrhandle_t *, void *, size_t, void **);

==== //depot/projects/gdb/lib/libthread_db/thread_db_int.h#9 (text+ko) ====

@@ -66,23 +66,22 @@
 	td_err_e (*to_thr_event_getmsg)(const td_thrhandle_t *,
 	    td_event_msg_t *);
 	td_err_e (*to_thr_get_info)(const td_thrhandle_t *, td_thrinfo_t *);
-	td_err_e (*to_thr_getfpregs)(const td_thrhandle_t *, fpregset_t *);
-	td_err_e (*to_thr_getgregs)(const td_thrhandle_t *, gregset_t *);
+	td_err_e (*to_thr_getfpregs)(const td_thrhandle_t *, struct fpreg *);
+	td_err_e (*to_thr_getgregs)(const td_thrhandle_t *, struct reg *);
+	td_err_e (*to_thr_getxregs)(const td_thrhandle_t *, void *);
+	td_err_e (*to_thr_getxregsize)(const td_thrhandle_t *, int *);
 	td_err_e (*to_thr_set_event)(const td_thrhandle_t *,
 	    td_thr_events_t *);
 	td_err_e (*to_thr_setfpregs)(const td_thrhandle_t *,
-	    const fpregset_t *);
-	td_err_e (*to_thr_setgregs)(const td_thrhandle_t *, const gregset_t *);
+	    const struct fpreg *);
+	td_err_e (*to_thr_setgregs)(const td_thrhandle_t *, const struct reg *);
+	td_err_e (*to_thr_setxregs)(const td_thrhandle_t *, const void *);
 	td_err_e (*to_thr_validate)(const td_thrhandle_t *);
 	td_err_e (*to_thr_tls_get_addr)(const td_thrhandle_t *,
                    void *, size_t, void **);
 
 	/* FreeBSD specific extensions. */
 	td_err_e (*to_thr_sstep)(const td_thrhandle_t *, int);
-#if defined(__i386__)
-	td_err_e (*to_thr_getxmmregs)(const td_thrhandle_t *, char *);
-	td_err_e (*to_thr_setxmmregs)(const td_thrhandle_t *, const char *);
-#endif
 };
 
 #ifdef TD_DEBUG


More information about the p4-projects mailing list