* target.h (target_signal_to_string): Make return type const char *.
[external/binutils.git] / gdb / gdbserver / thread-db.c
index 1869dbd..e36b0fb 100644 (file)
@@ -1,5 +1,6 @@
 /* Thread management interface, for the remote server for GDB.
-   Copyright (C) 2002, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
+   Copyright (C) 2002, 2004, 2005, 2006, 2007, 2008, 2009
+   Free Software Foundation, Inc.
 
    Contributed by MontaVista Software.
 
@@ -44,7 +45,7 @@ static td_thragent_t *thread_agent;
 static int find_one_thread (int);
 static int find_new_threads_callback (const td_thrhandle_t *th_p, void *data);
 
-static char *
+static const char *
 thread_db_err_str (td_err_e err)
 {
   static char buf[64];
@@ -130,7 +131,7 @@ thread_db_state_str (td_thr_state_e state)
 }
 #endif
 
-static void
+static int
 thread_db_create_event (CORE_ADDR where)
 {
   td_event_msg_t msg;
@@ -159,14 +160,18 @@ thread_db_create_event (CORE_ADDR where)
   /* msg.event == TD_EVENT_CREATE */
 
   find_new_threads_callback (msg.th_p, NULL);
+
+  return 0;
 }
 
 #if 0
-static void
+static int
 thread_db_death_event (CORE_ADDR where)
 {
   if (debug_threads)
     fprintf (stderr, "Thread death event.\n");
+
+  return 0;
 }
 #endif
 
@@ -275,7 +280,6 @@ find_one_thread (int lwpid)
     return 0;
 
   process->thread_known = 1;
-  process->tid = ti.ti_tid;
   process->th = th;
 
   return 1;
@@ -308,7 +312,6 @@ maybe_attach_thread (const td_thrhandle_t *th_p, td_thrinfo_t *ti_p)
 
   process = inferior_target_data (inferior);
 
-  process->tid = ti_p->ti_tid;
   process->thread_known = 1;
   process->th = *th_p;