diff options
author | Doug Evans <dje@google.com> | 2014-02-19 16:38:44 -0800 |
---|---|---|
committer | Doug Evans <dje@google.com> | 2014-02-19 16:38:44 -0800 |
commit | f7667f0de68675a72743c73333c83a5fc6e5e69e (patch) | |
tree | 3bb438477d258ea00632081f632944136cc716e7 /gdb/gdbserver/gdbthread.h | |
parent | b3312d801920bf1705263f533cdf16330bddedbe (diff) | |
download | gdb-f7667f0de68675a72743c73333c83a5fc6e5e69e.zip gdb-f7667f0de68675a72743c73333c83a5fc6e5e69e.tar.gz gdb-f7667f0de68675a72743c73333c83a5fc6e5e69e.tar.bz2 |
Add backlink from lwp_info to thread_info.
* gdbthread.h (add_thread): Change result type to struct thread_info *.
* inferiors.c (add_thread): Change result type to struct thread_info *.
All callers updated.
(add_lwp): Call add_thread here instead of in callers.
All callers updated.
* linux-low.h (get_lwp_thread): Rewrite.
(struct lwp_info): New member "thread".
This speeds up gdbserver attach in non-stop mode because now get_lwp_thread
doesn't do a linear search for the corresponding thread_info object.
Diffstat (limited to 'gdb/gdbserver/gdbthread.h')
-rw-r--r-- | gdb/gdbserver/gdbthread.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/gdbserver/gdbthread.h b/gdb/gdbserver/gdbthread.h index 0eac5a4..9785d67 100644 --- a/gdb/gdbserver/gdbthread.h +++ b/gdb/gdbserver/gdbthread.h @@ -74,7 +74,7 @@ struct thread_info extern struct inferior_list all_threads; void remove_thread (struct thread_info *thread); -void add_thread (ptid_t ptid, void *target_data); +struct thread_info *add_thread (ptid_t ptid, void *target_data); struct thread_info *get_first_thread (void); |