[uClibc-cvs] CVS uClibc/libpthread/linuxthreads_db

CVS User jocke jocke at codepoet.org
Mon Jan 31 15:48:38 UTC 2005


Update of /var/cvs/uClibc/libpthread/linuxthreads_db
In directory nail:/tmp/cvs-serv24352

Modified Files:
	td_thr_getfpregs.c td_thr_getgregs.c 
Log Message:
Sync with latest GLIBC.


--- /var/cvs/uClibc/libpthread/linuxthreads_db/td_thr_getfpregs.c	2003/02/27 18:13:00	1.3
+++ /var/cvs/uClibc/libpthread/linuxthreads_db/td_thr_getfpregs.c	2005/01/31 15:48:37	1.4
@@ -1,5 +1,5 @@
 /* Get a thread's floating-point register set.
-   Copyright (C) 1999, 2001 Free Software Foundation, Inc.
+   Copyright (C) 1999, 2001, 2003 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper at cygnus.com>, 1999.
 
@@ -30,7 +30,10 @@
 
   if (th->th_unique == NULL)
     {
-      memset (regset, '\0', sizeof (*regset));
+      /* No data yet.  Use the main thread.  */
+      pid_t pid = ps_getpid (th->th_ta_p->ph);
+      if (ps_lgetfpregs (th->th_ta_p->ph, pid, regset) != PS_OK)
+	return TD_ERR;
       return TD_OK;
     }
 
--- /var/cvs/uClibc/libpthread/linuxthreads_db/td_thr_getgregs.c	2003/02/27 18:13:00	1.3
+++ /var/cvs/uClibc/libpthread/linuxthreads_db/td_thr_getgregs.c	2005/01/31 15:48:37	1.4
@@ -1,5 +1,5 @@
 /* Get a thread's general register set.
-   Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.
+   Copyright (C) 1999, 2000, 2001, 2003 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper at cygnus.com>, 1999.
 
@@ -30,8 +30,10 @@
 
   if (th->th_unique == NULL)
     {
-      /* No data yet.  */
-      memset (gregs, '\0', sizeof (prgregset_t));
+      /* No data yet.  Use the main thread.  */
+      pid_t pid = ps_getpid (th->th_ta_p->ph);
+      if (ps_lgetregs (th->th_ta_p->ph, pid, gregs) != PS_OK)
+	return TD_ERR;
       return TD_OK;
     }
 



More information about the uClibc-cvs mailing list