Add backlink from lwp_info to thread_info.
authorDoug Evans <dje@google.com>
Thu, 20 Feb 2014 00:38:44 +0000 (16:38 -0800)
committerDoug Evans <dje@google.com>
Thu, 20 Feb 2014 00:38:44 +0000 (16:38 -0800)
commitf7667f0de68675a72743c73333c83a5fc6e5e69e
tree3bb438477d258ea00632081f632944136cc716e7
parentb3312d801920bf1705263f533cdf16330bddedbe
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.
gdb/gdbserver/ChangeLog
gdb/gdbserver/gdbthread.h
gdb/gdbserver/inferiors.c
gdb/gdbserver/linux-low.c
gdb/gdbserver/linux-low.h