diff options
author | Hannes Domani <ssbssa@yahoo.de> | 2020-04-24 17:23:59 +0200 |
---|---|---|
committer | Hannes Domani <ssbssa@yahoo.de> | 2020-04-30 18:30:20 +0200 |
commit | 7d186bc04245c5757f396c2d4f8f89f24818628e (patch) | |
tree | cd43bdbf890d076a6a2a8889c0be130e30e8d3e9 /gdbserver/win32-low.h | |
parent | ee9d1e5f76033cd8432713a76381ade76697df04 (diff) | |
download | gdb-7d186bc04245c5757f396c2d4f8f89f24818628e.zip gdb-7d186bc04245c5757f396c2d4f8f89f24818628e.tar.gz gdb-7d186bc04245c5757f396c2d4f8f89f24818628e.tar.bz2 |
Implement debugging of WOW64 processes in gdbserver
gdbserver/ChangeLog:
2020-04-30 Hannes Domani <ssbssa@yahoo.de>
* configure.srv <x86_64-*-mingw*, x86_64-*-cygwin*> (srv_tgtobj):
Add arch/i386.o.
* win32-arm-low.cc (arm_num_regs): New function.
(struct win32_target_ops): Use arm_num_regs.
* win32-i386-low.cc (win32_get_current_dr): Adapt for WOW64
processes.
(i386_get_thread_context): Likewise.
(i386_prepare_to_resume): Likewise.
(i386_thread_added): Likewise.
(i386_single_step): Likewise.
(i386_fetch_inferior_register): Likewise.
(i386_store_inferior_register): Likewise.
(i386_arch_setup): Likewise.
(i386_win32_num_regs): New function.
(struct win32_target_ops): Use i386_win32_num_regs.
* win32-low.cc (win32_get_thread_context): Adapt for WOW64
processes.
(win32_require_context): Likewise.
(child_add_thread): Likewise.
(do_initial_child_stuff): Likewise.
(continue_one_thread): Likewise.
(win32_process_target::resume): Likewise.
(load_psapi): Likewise.
(win32_add_all_dlls): Likewise.
(maybe_adjust_pc): Likewise.
(win32_process_target::qxfer_siginfo): Likewise.
(initialize_low): Likewise.
* win32-low.h (struct win32_target_ops): Change num_regs to
callback function.
Diffstat (limited to 'gdbserver/win32-low.h')
-rw-r--r-- | gdbserver/win32-low.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/gdbserver/win32-low.h b/gdbserver/win32-low.h index b3fa392..a023eb1 100644 --- a/gdbserver/win32-low.h +++ b/gdbserver/win32-low.h @@ -27,6 +27,14 @@ struct target_desc; /* The inferior's target description. This is a global because the Windows ports support neither bi-arch nor multi-process. */ 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 struct win32_target_ops { @@ -34,7 +42,7 @@ struct win32_target_ops void (*arch_setup) (void); /* The number of target registers. */ - int num_regs; + int (*num_regs) (void); /* Perform initializations on startup. */ void (*initial_stuff) (void); |