diff options
author | Hannes Domani <ssbssa@yahoo.de> | 2020-09-23 18:16:24 +0200 |
---|---|---|
committer | Hannes Domani <ssbssa@yahoo.de> | 2020-09-24 19:47:26 +0200 |
commit | 642ed0e9ecf4e5fe526bd3ad6d697008e1dba51d (patch) | |
tree | 8e605a42d1dd8a32a149dc467ecdd58b3cad6083 /gdbserver | |
parent | 6006bb78cc14a409166dd12da8417f7f049d1999 (diff) | |
download | gdb-642ed0e9ecf4e5fe526bd3ad6d697008e1dba51d.zip gdb-642ed0e9ecf4e5fe526bd3ad6d697008e1dba51d.tar.gz gdb-642ed0e9ecf4e5fe526bd3ad6d697008e1dba51d.tar.bz2 |
Handle 64bit breakpoints of WOW64 processes as SIGINT
When a WOW64 process triggers a breakpoint exception in 64bit code (which
happens when a 64bit gdb calls DebugBreakProcess for a 32bit target),
gdb ignores the breakpoint (because Wow64GetThreadContext can only report
the pc of 32bit code, and there is not int3 at this location).
But if these 64bit breakpoint exceptions are handled as SIGINT, gdb
doesn't check for int3, and always stops the target.
gdb/ChangeLog:
2020-09-23 Hannes Domani <ssbssa@yahoo.de>
* nat/windows-nat.c (handle_exception): Handle 64bit breakpoints
in WOW64 processes as SIGINT.
* nat/windows-nat.h: Make wow64_process a shared variable.
* windows-nat.c: Remove static wow64_process variable.
gdbserver/ChangeLog:
2020-09-23 Hannes Domani <ssbssa@yahoo.de>
* win32-low.cc: Remove local wow64_process variable.
* win32-low.h: Remove local wow64_process variable.
Diffstat (limited to 'gdbserver')
-rw-r--r-- | gdbserver/ChangeLog | 5 | ||||
-rw-r--r-- | gdbserver/win32-low.cc | 4 | ||||
-rw-r--r-- | gdbserver/win32-low.h | 2 |
3 files changed, 5 insertions, 6 deletions
diff --git a/gdbserver/ChangeLog b/gdbserver/ChangeLog index 0c8af7c..9c224c1 100644 --- a/gdbserver/ChangeLog +++ b/gdbserver/ChangeLog @@ -1,3 +1,8 @@ +2020-09-23 Hannes Domani <ssbssa@yahoo.de> + + * win32-low.cc: Remove local wow64_process variable. + * win32-low.h: Remove local wow64_process variable. + 2020-09-10 Kamil Rytarowski <n54@gmx.com> * netbsd-low.cc: Add. diff --git a/gdbserver/win32-low.cc b/gdbserver/win32-low.cc index a11cc74..588a23a 100644 --- a/gdbserver/win32-low.cc +++ b/gdbserver/win32-low.cc @@ -91,10 +91,6 @@ static int faked_breakpoint = 0; /* True if current_process_handle needs to be closed. */ static bool open_process_used = false; -#ifdef __x86_64__ -bool wow64_process = false; -#endif - const struct target_desc *win32_tdesc; #ifdef __x86_64__ const struct target_desc *wow64_win32_tdesc; diff --git a/gdbserver/win32-low.h b/gdbserver/win32-low.h index f3b4477..258eeb3 100644 --- a/gdbserver/win32-low.h +++ b/gdbserver/win32-low.h @@ -30,8 +30,6 @@ extern const struct target_desc *win32_tdesc; #ifdef __x86_64__ extern const struct target_desc *wow64_win32_tdesc; -extern bool wow64_process; - typedef BOOL (WINAPI *winapi_Wow64GetThreadContext) (HANDLE, PWOW64_CONTEXT); extern winapi_Wow64GetThreadContext win32_Wow64GetThreadContext; #endif |