aboutsummaryrefslogtreecommitdiff
path: root/zlib/examples/enough.c
diff options
context:
space:
mode:
authorPedro Alves <pedro@palves.net>2023-05-11 18:41:27 +0100
committerPedro Alves <pedro@palves.net>2024-05-10 11:25:59 +0100
commit11adfeba325cf8d28aa89f8652935a9e2d9e37ee (patch)
treeec6a3a512308d02762c4e177b1a0d7a60b9ca46d /zlib/examples/enough.c
parent5ad78cc6246a4a35a6bb51cb0dcc28d6c49aacd0 (diff)
downloadgdb-11adfeba325cf8d28aa89f8652935a9e2d9e37ee.zip
gdb-11adfeba325cf8d28aa89f8652935a9e2d9e37ee.tar.gz
gdb-11adfeba325cf8d28aa89f8652935a9e2d9e37ee.tar.bz2
Windows gdbserver: Eliminate soft-interrupt mechanism
I noticed that faked_breakpoint is write only. And then I hacked win32_process_target::request_interrupt to force it to stop threads using the soft_interrupt_requested mechanism (which suspends threads, and then fakes a breakpoint event in the main thread), and saw that it no longer works -- gdbserver crashes accessing a NULL current_thread, because fake_breakpoint_event does not switch to a thread. This code was originally added for Windows CE, as neither GenerateConsoleCtrlEvent nor DebugBreakProcess worked there. We nowadays require Windows XP or later, and XP has DebugBreakProcess. The soft_interrupt_requested mechanism has other problems, like for example faking the event in the main thread, even if that thread was previously stopped, due to scheduler-locking. A following patch will add a similar mechanism stopping all threads with SuspendThread to native GDB, for non-stop mode, which doesn't have these problems. It's different enough from this old code that I think we should just rip the old code out, and reimplement it from scratch (based on gdb's version) when we need it. Change-Id: I89e98233a9c40c6dcba7c8e1dacee08603843fb1
Diffstat (limited to 'zlib/examples/enough.c')
0 files changed, 0 insertions, 0 deletions