]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blobdiff - gdb/bsd-uthread.c
Copyright updates for 2007.
[thirdparty/binutils-gdb.git] / gdb / bsd-uthread.c
index b1eb6c3812fa95619a69528c272a43ec0f7fb17c..24edeb8fb2c55a732104966411f6103509d7ba0a 100644 (file)
@@ -1,6 +1,6 @@
 /* BSD user-level threads support.
 
-   Copyright 2005 Free Software Foundation, Inc.
+   Copyright (C) 2005, 2007 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -16,8 +16,8 @@
 
    You should have received a copy of the GNU General Public License
    along with this program; if not, write to the Free Software
-   Foundation, Inc., 59 Temple Place - Suite 330,
-   Boston, MA 02111-1307, USA.  */
+   Foundation, Inc., 51 Franklin Street, Fifth Floor,
+   Boston, MA 02110-1301, USA.  */
 
 #include "defs.h"
 #include "gdbcore.h"
@@ -26,6 +26,7 @@
 #include "objfiles.h"
 #include "observer.h"
 #include "regcache.h"
+#include "solib.h"
 #include "solist.h"
 #include "symfile.h"
 #include "target.h"
@@ -319,8 +320,9 @@ bsd_uthread_store_registers (int regnum)
 
 static LONGEST
 bsd_uthread_xfer_partial (struct target_ops *ops, enum target_object object,
-                         const char *annex, void *readbuf,
-                         const void *writebuf, ULONGEST offset, LONGEST len)
+                         const char *annex, gdb_byte *readbuf,
+                         const gdb_byte *writebuf,
+                         ULONGEST offset, LONGEST len)
 {
   gdb_assert (ops->beneath->to_xfer_partial);
   return ops->beneath->to_xfer_partial (ops->beneath, object, annex, readbuf,
@@ -341,7 +343,7 @@ bsd_uthread_wait (ptid_t ptid, struct target_waitstatus *status)
                                    builtin_type_void_data_ptr);
   if (addr != 0)
     {
-      char buf[4];
+      gdb_byte buf[4];
 
       /* FIXME: For executables linked statically with the threads
          library, we end up here before the program has actually been
@@ -467,11 +469,9 @@ bsd_uthread_pid_to_str (ptid_t ptid)
   if (ptid_get_tid (ptid) != 0)
     {
       static char buf[64];
-      int size;
 
-      size = snprintf (buf, sizeof buf, "process %d, thread 0x%lx",
-                      ptid_get_pid (ptid), ptid_get_tid (ptid));
-      gdb_assert (size < sizeof buf);
+      xsnprintf (buf, sizeof buf, "process %d, thread 0x%lx",
+                ptid_get_pid (ptid), ptid_get_tid (ptid));
       return buf;
     }