aboutsummaryrefslogtreecommitdiff
path: root/gdb/gdbserver/linux-low.h
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/gdbserver/linux-low.h')
-rw-r--r--gdb/gdbserver/linux-low.h25
1 files changed, 12 insertions, 13 deletions
diff --git a/gdb/gdbserver/linux-low.h b/gdb/gdbserver/linux-low.h
index b3e75db..7459710 100644
--- a/gdb/gdbserver/linux-low.h
+++ b/gdb/gdbserver/linux-low.h
@@ -223,21 +223,22 @@ struct linux_target_ops
extern struct linux_target_ops the_low_target;
-#define ptid_of(proc) ((proc)->entry.id)
-#define pid_of(proc) ptid_get_pid ((proc)->entry.id)
-#define lwpid_of(proc) ptid_get_lwp ((proc)->entry.id)
-
-#define get_lwp(inf) ((struct lwp_info *)(inf))
-#define get_thread_lwp(thr) (get_lwp (inferior_target_data (thr)))
+#define get_thread_lwp(thr) ((struct lwp_info *) (inferior_target_data (thr)))
#define get_lwp_thread(lwp) ((lwp)->thread)
+/* This struct is recorded in the target_data field of struct thread_info.
+
+ On linux ``all_threads'' is keyed by the LWP ID, which we use as the
+ GDB protocol representation of the thread ID. Threads also have
+ a "process ID" (poorly named) which is (presently) the same as the
+ LWP ID.
+
+ There is also ``all_processes'' is keyed by the "overall process ID",
+ which GNU/Linux calls tgid, "thread group ID". */
+
struct lwp_info
{
- struct inferior_list_entry entry;
-
- /* Backlink to the thread_info object.
- It is the "main" representation of the thread, we just contain
- linux-specific subordinate data. */
+ /* Backlink to the parent object. */
struct thread_info *thread;
/* If this flag is set, the next SIGSTOP will be ignored (the
@@ -340,8 +341,6 @@ struct lwp_info
struct arch_lwp_info *arch_private;
};
-extern struct inferior_list all_lwps;
-
int linux_pid_exe_is_elf_64_file (int pid, unsigned int *machine);
void linux_attach_lwp (unsigned long pid);