aboutsummaryrefslogtreecommitdiff
path: root/gdb/i386gnu-nat.c
diff options
context:
space:
mode:
authorPedro Alves <palves@redhat.com>2013-09-18 14:47:51 +0000
committerPedro Alves <palves@redhat.com>2013-09-18 14:47:51 +0000
commitca08a94cf08890f7a3b3dd074d5b42a09ccd868e (patch)
tree33b0faa586bcd15a8433c3d280c280034df9b23e /gdb/i386gnu-nat.c
parente4c6a2c42df650ad28efcb081244d41954d91353 (diff)
downloadgdb-ca08a94cf08890f7a3b3dd074d5b42a09ccd868e.zip
gdb-ca08a94cf08890f7a3b3dd074d5b42a09ccd868e.tar.gz
gdb-ca08a94cf08890f7a3b3dd074d5b42a09ccd868e.tar.bz2
Subject: [PATCH] [Hurd/gnu-nat.c] Use ptid_t.lwpid to store thread ids
instead of ptid_t.tid. In preparation for reusing gnu-nat.c in gdbserver, switch to storing thread ids in the lwpid field of ptid_t rather than in the tid field. The Hurd's thread model is 1:1, so it doesn't feel wrong anyway. gdb/ 2013-09-18 Pedro Alves <palves@redhat.com> * gnu-nat.c (inf_validate_procs, gnu_wait, gnu_resume) (gnu_create_inferior) (gnu_attach, gnu_thread_alive, gnu_pid_to_str, cur_thread) (set_sig_thread_cmd): Use the lwpid field of ptids to store/extract thread ids instead of the tid field. * i386gnu-nat.c (gnu_fetch_registers): Adjust.
Diffstat (limited to 'gdb/i386gnu-nat.c')
-rw-r--r--gdb/i386gnu-nat.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gdb/i386gnu-nat.c b/gdb/i386gnu-nat.c
index 0fd8d91..2b93fee 100644
--- a/gdb/i386gnu-nat.c
+++ b/gdb/i386gnu-nat.c
@@ -132,7 +132,7 @@ gnu_fetch_registers (struct target_ops *ops,
inf_update_procs (gnu_current_inf);
thread = inf_tid_to_thread (gnu_current_inf,
- ptid_get_tid (inferior_ptid));
+ ptid_get_lwp (inferior_ptid));
if (!thread)
error (_("Can't fetch registers from thread %s: No such thread"),
target_pid_to_str (inferior_ptid));
@@ -225,7 +225,7 @@ gnu_store_registers (struct target_ops *ops,
inf_update_procs (gnu_current_inf);
thread = inf_tid_to_thread (gnu_current_inf,
- ptid_get_tid (inferior_ptid));
+ ptid_get_lwp (inferior_ptid));
if (!thread)
error (_("Couldn't store registers into thread %s: No such thread"),
target_pid_to_str (inferior_ptid));