diff -urN src/gdb/gdbserver/server.c dev/gdb/gdbserver/server.c --- src/gdb/gdbserver/server.c 2007-05-11 14:04:57.000000000 +0200 +++ dev/gdb/gdbserver/server.c 2007-05-15 19:23:15.000000000 +0200 @@ -259,6 +259,15 @@ { static struct inferior_list_entry *thread_ptr; + /* Reply the current thread id. */ + if (strcmp ("qC", own_buf) == 0) + { + thread_ptr = all_threads.head; + sprintf (own_buf, "QC%x", + thread_to_gdb_id ((struct thread_info *)thread_ptr)); + return; + } + if (strcmp ("qSymbol::", own_buf) == 0) { if (the_target->look_up_symbols != NULL)