From: Hannes Domani via Gdb-patches <gdb-patches@sourceware.org>
To: gdb-patches@sourceware.org
Subject: [PATCH 2/3] Revert "Fix ctrl-c when debugging WOW64 processes"
Date: Wed, 23 Sep 2020 19:21:21 +0200 [thread overview]
Message-ID: <20200923172122.2089-2-ssbssa@yahoo.de> (raw)
In-Reply-To: <20200923172122.2089-1-ssbssa@yahoo.de>
This is no longer needed, since breakpoints in 64bit code can now be
handled by gdb.
2020-09-23 Hannes Domani <ssbssa@yahoo.de>
* windows-nat.c (ctrl_c_handler): Remove special handling for
WOW64 processes.
---
gdb/windows-nat.c | 37 +++----------------------------------
1 file changed, 3 insertions(+), 34 deletions(-)
diff --git a/gdb/windows-nat.c b/gdb/windows-nat.c
index 1e8e21446f..f9172c3a7f 100644
--- a/gdb/windows-nat.c
+++ b/gdb/windows-nat.c
@@ -71,7 +71,6 @@
#include "gdbsupport/pathstuff.h"
#include "gdbsupport/gdb_wait.h"
#include "nat/windows-nat.h"
-#include "gdbsupport/symbol.h"
using namespace windows_nat;
@@ -234,9 +233,6 @@ static std::vector<windows_thread_info *> thread_list;
/* Counts of things. */
static int saw_create;
static int open_process_used = 0;
-#ifdef __x86_64__
-static void *wow64_dbgbreak;
-#endif
/* User options. */
static bool new_console = false;
@@ -1523,36 +1519,9 @@ ctrl_c_handler (DWORD event_type)
if (!new_console && !attach_flag)
return TRUE;
-#ifdef __x86_64__
- if (wow64_process)
- {
- /* Call DbgUiRemoteBreakin of the 32bit ntdll.dll in the target process.
- DebugBreakProcess would call the one of the 64bit ntdll.dll, which
- can't be correctly handled by gdb. */
- if (wow64_dbgbreak == nullptr)
- {
- CORE_ADDR addr;
- if (!find_minimal_symbol_address ("ntdll!DbgUiRemoteBreakin",
- &addr, 0))
- wow64_dbgbreak = (void *) addr;
- }
-
- if (wow64_dbgbreak != nullptr)
- {
- HANDLE thread = CreateRemoteThread (current_process_handle, NULL,
- 0, (LPTHREAD_START_ROUTINE)
- wow64_dbgbreak, NULL, 0, NULL);
- if (thread)
- CloseHandle (thread);
- }
- }
- else
-#endif
- {
- if (!DebugBreakProcess (current_process_handle))
- warning (_("Could not interrupt program. "
- "Press Ctrl-c in the program console."));
- }
+ if (!DebugBreakProcess (current_process_handle))
+ warning (_("Could not interrupt program. "
+ "Press Ctrl-c in the program console."));
/* Return true to tell that Ctrl-C has been handled. */
return TRUE;
--
2.27.0
next prev parent reply other threads:[~2020-09-23 17:21 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20200923172122.2089-1-ssbssa.ref@yahoo.de>
2020-09-23 17:21 ` [PATCH 1/3] Handle 64bit breakpoints of WOW64 processes as SIGINT Hannes Domani via Gdb-patches
2020-09-23 17:21 ` Hannes Domani via Gdb-patches [this message]
2020-09-23 17:21 ` [PATCH 3/3] Remove call of GenerateConsoleCtrlEvent Hannes Domani via Gdb-patches
2020-09-24 3:35 ` Simon Marchi
2020-09-24 14:40 ` Eli Zaretskii via Gdb-patches
2020-09-24 15:01 ` Hannes Domani via Gdb-patches
2020-09-24 3:30 ` [PATCH 1/3] Handle 64bit breakpoints of WOW64 processes as SIGINT Simon Marchi
2020-09-24 15:26 ` Hannes Domani via Gdb-patches
2020-09-24 15:29 ` Simon Marchi
2020-09-24 16:37 ` Hannes Domani via Gdb-patches
2020-09-24 16:42 ` Simon Marchi
2020-09-24 17:05 ` Hannes Domani via Gdb-patches
2020-09-24 17:22 ` Joel Brobecker
2020-09-24 17:51 ` Hannes Domani via Gdb-patches
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200923172122.2089-2-ssbssa@yahoo.de \
--to=gdb-patches@sourceware.org \
--cc=ssbssa@yahoo.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox