Implement stopped_by_sw_breakpoint for Windows gdbserver
This changes the Windows gdbserver port to implement the
stopped_by_sw_breakpoint target method. This is needed to support
pending stops.
This is a separate patch now, because Pedro suggested splitting it out
for simpler bisecting, in the case that it introduces a bug.
gdbserver/ChangeLog
2020-04-08 Tom Tromey <tromey@adacore.com>
* win32-low.h (win32_process_target::stopped_by_sw_breakpoint)
(win32_process_target::supports_stopped_by_sw_breakpoint):
Declare.
* win32-low.c (win32_supports_z_point_type): Always handle
Z_PACKET_SW_BP.
(win32_insert_point): Call insert_memory_breakpoint when needed.
(win32_remove_point): Call remove_memory_breakpoint when needed.
(win32_process_target::stopped_by_sw_breakpoint)
(win32_process_target::supports_stopped_by_sw_breakpoint): New
methods.
(win32_target_ops): Update.
(maybe_adjust_pc): New function.
(win32_wait): Call maybe_adjust_pc.