This is the mail archive of the libc-ports@sources.redhat.com mailing list for the libc-ports 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]

LinuxThreads libthread_db 64-bit fixes


I don't know if this will trigger on any other platforms, but it's necessary
if you use linuxthreads on x86_64.  td_thr_events_t is 8 bytes,
td_thrhandle_t is 16 bytes.  It looks like the same problem would exist on
any 64-bit platform.

Checked in; Roland, how much discretion have I got on the 2.3 branch for
stuff in ports?

-- 
Daniel Jacobowitz
CodeSourcery, LLC

2005-11-02  Daniel Jacobowitz  <dan@codesourcery.com>

	* td_ta_clear_event.c (td_ta_clear_event): Correct arguments to
	sizeof.
	* td_ta_set_event.c (td_ta_set_event): Likewise.
	* td_thr_clear_event.c (td_thr_clear_event): Likewise.
	* td_thr_set_event.c (td_thr_set_event): Likewise.

Index: glibc/linuxthreads_db/td_ta_clear_event.c
===================================================================
RCS file: /cvs/glibc/ports/linuxthreads_db/td_ta_clear_event.c,v
retrieving revision 1.4
diff -u -p -r1.4 glibc/linuxthreads_db/td_ta_clear_event.c
--- glibc/linuxthreads_db/td_ta_clear_event.c	28 Dec 2001 16:41:29 -0000	1.4
+++ glibc/linuxthreads_db/td_ta_clear_event.c	2 Nov 2005 19:25:05 -0000
@@ -1,5 +1,5 @@
 /* Globally disable events.
-   Copyright (C) 1999, 2001 Free Software Foundation, Inc.
+   Copyright (C) 1999, 2001, 2005 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@cygnus.com>, 1999.
 
@@ -37,7 +37,7 @@ td_ta_clear_event (ta, event)
 
   /* Write the new value into the thread data structure.  */
   if (ps_pdread (ta->ph, ta->pthread_threads_eventsp,
-		 &old_event, sizeof (td_thrhandle_t)) != PS_OK)
+		 &old_event, sizeof (td_thr_events_t)) != PS_OK)
     return TD_ERR;	/* XXX Other error value?  */
 
   /* Remove the set bits in.  */
@@ -46,7 +46,7 @@ td_ta_clear_event (ta, event)
 
   /* Write the new value into the thread data structure.  */
   if (ps_pdwrite (ta->ph, ta->pthread_threads_eventsp,
-		  &old_event, sizeof (td_thrhandle_t)) != PS_OK)
+		  &old_event, sizeof (td_thr_events_t)) != PS_OK)
     return TD_ERR;	/* XXX Other error value?  */
 
   return TD_OK;
Index: glibc/linuxthreads_db/td_ta_set_event.c
===================================================================
RCS file: /cvs/glibc/ports/linuxthreads_db/td_ta_set_event.c,v
retrieving revision 1.5
diff -u -p -r1.5 glibc/linuxthreads_db/td_ta_set_event.c
--- glibc/linuxthreads_db/td_ta_set_event.c	28 Dec 2001 16:41:29 -0000	1.5
+++ glibc/linuxthreads_db/td_ta_set_event.c	2 Nov 2005 19:25:06 -0000
@@ -1,5 +1,5 @@
 /* Globally enable events.
-   Copyright (C) 1999, 2001 Free Software Foundation, Inc.
+   Copyright (C) 1999, 2001, 2005 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@cygnus.com>, 1999.
 
@@ -37,7 +37,7 @@ td_ta_set_event (ta, event)
 
   /* Write the new value into the thread data structure.  */
   if (ps_pdread (ta->ph, ta->pthread_threads_eventsp,
-		 &old_event, sizeof (td_thrhandle_t)) != PS_OK)
+		 &old_event, sizeof (td_thr_events_t)) != PS_OK)
     return TD_ERR;	/* XXX Other error value?  */
 
   /* Or the new bits in.  */
@@ -46,7 +46,7 @@ td_ta_set_event (ta, event)
 
   /* Write the new value into the thread data structure.  */
   if (ps_pdwrite (ta->ph, ta->pthread_threads_eventsp,
-		  &old_event, sizeof (td_thrhandle_t)) != PS_OK)
+		  &old_event, sizeof (td_thr_events_t)) != PS_OK)
     return TD_ERR;	/* XXX Other error value?  */
 
   return TD_OK;
Index: glibc/linuxthreads_db/td_thr_clear_event.c
===================================================================
RCS file: /cvs/glibc/ports/linuxthreads_db/td_thr_clear_event.c,v
retrieving revision 1.5
diff -u -p -r1.5 glibc/linuxthreads_db/td_thr_clear_event.c
--- glibc/linuxthreads_db/td_thr_clear_event.c	16 Jul 2002 19:36:15 -0000	1.5
+++ glibc/linuxthreads_db/td_thr_clear_event.c	2 Nov 2005 19:25:06 -0000
@@ -1,5 +1,5 @@
 /* Disable specific event for thread.
-   Copyright (C) 1999, 2001, 2002 Free Software Foundation, Inc.
+   Copyright (C) 1999, 2001, 2002, 2005 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@cygnus.com>, 1999.
 
@@ -43,7 +43,7 @@ td_thr_clear_event (th, event)
 		 ((char *) th->th_unique
 		  + offsetof (struct _pthread_descr_struct,
 			      p_eventbuf.eventmask)),
-		 &old_event, sizeof (td_thrhandle_t)) != PS_OK)
+		 &old_event, sizeof (td_thr_events_t)) != PS_OK)
     return TD_ERR;	/* XXX Other error value?  */
 
   /* Remove the set bits in.  */
@@ -55,7 +55,7 @@ td_thr_clear_event (th, event)
 		  ((char *) th->th_unique
 		   + offsetof (struct _pthread_descr_struct,
 			       p_eventbuf.eventmask)),
-		  &old_event, sizeof (td_thrhandle_t)) != PS_OK)
+		  &old_event, sizeof (td_thr_events_t)) != PS_OK)
     return TD_ERR;	/* XXX Other error value?  */
 
   return TD_OK;
Index: glibc/linuxthreads_db/td_thr_set_event.c
===================================================================
RCS file: /cvs/glibc/ports/linuxthreads_db/td_thr_set_event.c,v
retrieving revision 1.6
diff -u -p -r1.6 glibc/linuxthreads_db/td_thr_set_event.c
--- glibc/linuxthreads_db/td_thr_set_event.c	16 Jul 2002 19:36:15 -0000	1.6
+++ glibc/linuxthreads_db/td_thr_set_event.c	2 Nov 2005 19:25:06 -0000
@@ -1,5 +1,5 @@
 /* Enable specific event for thread.
-   Copyright (C) 1999, 2001, 2002 Free Software Foundation, Inc.
+   Copyright (C) 1999, 2001, 2002, 2005 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@cygnus.com>, 1999.
 
@@ -43,7 +43,7 @@ td_thr_set_event (th, event)
 		 ((char *) th->th_unique
 		  + offsetof (struct _pthread_descr_struct,
 			      p_eventbuf.eventmask)),
-		 &old_event, sizeof (td_thrhandle_t)) != PS_OK)
+		 &old_event, sizeof (td_thr_events_t)) != PS_OK)
     return TD_ERR;	/* XXX Other error value?  */
 
   /* Or the new bits in.  */
@@ -55,7 +55,7 @@ td_thr_set_event (th, event)
 		  ((char *) th->th_unique
 		   + offsetof (struct _pthread_descr_struct,
 			       p_eventbuf.eventmask)),
-		  &old_event, sizeof (td_thrhandle_t)) != PS_OK)
+		  &old_event, sizeof (td_thr_events_t)) != PS_OK)
     return TD_ERR;	/* XXX Other error value?  */
 
   return TD_OK;


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