public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Simon Marchi <simark@simark.ca>
To: Hannes Domani <ssbssa@yahoo.de>, gdb-patches@sourceware.org
Subject: Re: [PATCH v3] Implement debugging of WOW64 processes in gdbserver
Date: Thu, 30 Apr 2020 12:26:41 -0400	[thread overview]
Message-ID: <dc2ee8c8-df61-1ed1-8a87-c34d0ed97234@simark.ca> (raw)
In-Reply-To: <20200430141349.21384-1-ssbssa@yahoo.de>

On 2020-04-30 10:13 a.m., Hannes Domani via Gdb-patches wrote:
> 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.
> ---
> v2:
> - Stop with error() if any of the WOW64 functions is not available when
>   debugging WOW64 processes.
> 
> v3:
> - Some more comments.
> - Error if IsWow64Process fails.
> - Removed win32_Wow64SuspendThread since it's not (yet) used.

Even if calling SuspendThread to suspend a WOW64 thread from a 64-bits GDB works,
we might still want to use Wow64SuspendThread, since it's the "right" thing to do.

Either way, this is OK.

Simon

  reply	other threads:[~2020-04-30 16:26 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20200430141349.21384-1-ssbssa.ref@yahoo.de>
2020-04-30 14:13 ` Hannes Domani
2020-04-30 16:26   ` Simon Marchi [this message]
2020-04-30 16:36     ` Hannes Domani

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=dc2ee8c8-df61-1ed1-8a87-c34d0ed97234@simark.ca \
    --to=simark@simark.ca \
    --cc=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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).