Use nat/windows-nat function indirection code
authorTom Tromey <tromey@adacore.com>
Fri, 30 Apr 2021 16:22:23 +0000 (10:22 -0600)
committerTom Tromey <tromey@adacore.com>
Fri, 30 Apr 2021 16:22:24 +0000 (10:22 -0600)
commitde0718729053b7c558166f3cc1a7d170c48a25de
treeea35bb3afdcb7b0fa7600dbfdd2150bac2f77af9
parent9e439f0098d1dd21d79dff3f030ddcd0b1cb244b
Use nat/windows-nat function indirection code

This changes gdbserver to use the function indirection code that was
just moved into nat/windows-nat.[ch].  One additional function is used
by gdbserver that was not used by gdb.

gdb/ChangeLog
2021-04-30  Tom Tromey  <tromey@adacore.com>

* nat/windows-nat.h (GenerateConsoleCtrlEvent): New define.
(GenerateConsoleCtrlEvent_ftype, GenerateConsoleCtrlEvent):
Declare.
* nat/windows-nat.c (GenerateConsoleCtrlEvent): Define.
(initialize_loadable): Initialize GenerateConsoleCtrlEvent.

gdbserver/ChangeLog
2021-04-30  Tom Tromey  <tromey@adacore.com>

* win32-low.cc (GETPROCADDRESS): Remove.
(winapi_DebugActiveProcessStop, winapi_DebugSetProcessKillOnExit)
(winapi_DebugBreakProcess, winapi_GenerateConsoleCtrlEvent)
(winapi_Wow64SetThreadContext, win32_Wow64GetThreadContext)
(win32_Wow64SetThreadContext): Remove.
(win32_set_thread_context, do_initial_child_stuff)
(win32_process_target::attach, win32_process_target::detach):
Update.
(winapi_EnumProcessModules, winapi_EnumProcessModulesEx)
(winapi_GetModuleInformation, winapi_GetModuleInformationA):
Remove.
(win32_EnumProcessModules, win32_EnumProcessModulesEx)
(win32_GetModuleInformation, win32_GetModuleInformationA):
Remove.
(load_psapi): Remove.
(win32_add_dll, win32_process_target::request_interrupt): Update.
(initialize_low): Call initialize_loadable.
gdb/ChangeLog
gdb/nat/windows-nat.c
gdb/nat/windows-nat.h
gdbserver/ChangeLog
gdbserver/win32-low.cc