aboutsummaryrefslogtreecommitdiff
path: root/gdb/gdbserver/gdbthread.h
diff options
context:
space:
mode:
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 d863ec0..adc23da 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 */