Share thread_rec between gdb and gdbserver
authorTom Tromey <tromey@adacore.com>
Wed, 8 Apr 2020 20:33:35 +0000 (14:33 -0600)
committerTom Tromey <tromey@adacore.com>
Wed, 8 Apr 2020 20:47:58 +0000 (14:47 -0600)
commit28688adf8f883fdd8b642a446ec5578236e84b1e
tree2183e5c7e4a1f52946c5d2c7b6d4bf1deeff1d09
parent4834dad062658ef49ef86c9c48eb004c48a242a5
Share thread_rec between gdb and gdbserver

This changes gdb and gdbserver to use the same calling convention for
the "thread_rec" helper function.  Fully merging these is difficult
due to differences in how threads are managed by the enclosing
applications; but sharing a declaration makes it possible for future
shared code to call this method.

gdb/ChangeLog
2020-04-08  Tom Tromey  <tromey@adacore.com>

* windows-nat.c (enum thread_disposition_type): Move to
nat/windows-nat.h.
(windows_nat::thread_rec): Rename from thread_rec.  No longer
static.
(windows_add_thread, windows_nat_target::fetch_registers)
(windows_nat_target::store_registers, handle_exception)
(windows_nat_target::resume, get_windows_debug_event)
(windows_nat_target::get_tib_address)
(windows_nat_target::thread_name)
(windows_nat_target::thread_alive): Update.
* nat/windows-nat.h (enum thread_disposition_type): Move from
windows-nat.c.
(thread_rec): Declare.

gdbserver/ChangeLog
2020-04-08  Tom Tromey  <tromey@adacore.com>

* win32-low.c (windows_nat::thread_rec): Rename from thread_rec.
No longer static.  Change parameters.
(child_add_thread, child_fetch_inferior_registers)
(child_store_inferior_registers, win32_resume)
(win32_get_tib_address): Update.
gdb/ChangeLog
gdb/nat/windows-nat.h
gdb/windows-nat.c
gdbserver/ChangeLog
gdbserver/win32-low.cc