move some static thread state into remote_state
authorTom Tromey <tromey@redhat.com>
Wed, 14 Aug 2013 18:17:50 +0000 (18:17 +0000)
committerTom Tromey <tromey@redhat.com>
Wed, 14 Aug 2013 18:17:50 +0000 (18:17 +0000)
commit0d031856d82030c8bc52fc2d794b116eae88a92c
tree4fb7323f014fc2bc64ac73c2d5541f6ff6615ffc
parentee154beebfe8b88abc7c6b12960b0493151c0e33
move some static thread state into remote_state

This moves a few static variables from thread-info functions into
remote_state.  Pedro said on irc that these functions implement the
ancient thread-discovery method and that he wouldn't be surprised if
they had rotted; nevertheless it seems safer to me to make them
explicitly per-remote.

This necessitated moving a couple of macros and a typedef earlier in
the file.

* remote.c (struct remote_state) <echo_nextthread, nextthread,
resultthreadlist>: New fields.
(OPAQUETHREADBYTES, threadref, MAXTHREADLISTRESULTS): Move earlier.
(remote_get_threadlist, remote_threadlist_iterator): Use
new fields.  Remove static variables.
gdb/ChangeLog
gdb/remote.c