summaryrefslogtreecommitdiff
path: root/gdb/gdbserver/gdbthread.h
diff options
context:
space:
mode:
authorqiyao <qiyao>2012-11-09 02:58:50 +0000
committerqiyao <qiyao>2012-11-09 02:58:50 +0000
commit62047ec9c7daf67b6abc8ddda5beab6e34c27c86 (patch)
tree91d0f9f9cd4f468bbc66c180239a130d6d4b4785 /gdb/gdbserver/gdbthread.h
parentbbc0941a459545f38f2cbc9b405a4f332da8cf49 (diff)
downloadgdb-62047ec9c7daf67b6abc8ddda5beab6e34c27c86.tar.gz
gdb/gdbserver:
2012-11-09 Yao Qi <yao@codesourcery.com> * spu-low.c (current_ptid): Move it to .. * gdbthread.h: ... here. New. * remote-utils.c (read_ptid): Use macro 'current_ptid'. * server.c (myresume, process_serial_event): Likewise. * thread-db.c (thread_db_find_new_threads): Likewise. * tracepoint.c (run_inferior_command): Likewise.
Diffstat (limited to 'gdb/gdbserver/gdbthread.h')
-rw-r--r--gdb/gdbserver/gdbthread.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/gdb/gdbserver/gdbthread.h b/gdb/gdbserver/gdbthread.h
index d863ec00104..adc23da6423 100644
--- a/gdb/gdbserver/gdbthread.h
+++ b/gdb/gdbserver/gdbthread.h
@@ -68,4 +68,6 @@ void add_thread (ptid_t ptid, void *target_data);
struct thread_info *find_thread_ptid (ptid_t ptid);
struct thread_info *gdb_id_to_thread (unsigned int);
+/* Get current thread ID (Linux task ID). */
+#define current_ptid ((struct inferior_list_entry *) current_inferior)->id
#endif /* GDB_THREAD_H */