From: Hannes Domani via Gdb-patches <gdb-patches@sourceware.org>
To: Joel Brobecker <brobecker@adacore.com>
Cc: Simon Marchi <simark@simark.ca>,
"gdb-patches@sourceware.org" <gdb-patches@sourceware.org>
Subject: Re: [PATCH 1/3] Handle 64bit breakpoints of WOW64 processes as SIGINT
Date: Thu, 24 Sep 2020 17:51:08 +0000 (UTC) [thread overview]
Message-ID: <1994899713.688642.1600969868909@mail.yahoo.com> (raw)
In-Reply-To: <20200924172247.GS4075@adacore.com>
Am Donnerstag, 24. September 2020, 19:22:51 MESZ hat Joel Brobecker <brobecker@adacore.com> Folgendes geschrieben:
> > > >>> diff --git a/gdb/nat/windows-nat.c b/gdb/nat/windows-nat.c
> > > >>> index a277156138..2cbbc0f2cc 100644
> > > >>> --- a/gdb/nat/windows-nat.c
> > > >>> +++ b/gdb/nat/windows-nat.c
> > > >>> @@ -243,6 +243,13 @@ handle_exception (struct target_waitstatus *ourstatus, bool debug_exceptions)
> > > >>> }
> > > >>> else if (wow64_process)
> > > >>> {
> > > >>> + /* This breakpoint exception is triggered for WOW64 processes when
> > > >>> + reaching an int3 instruction in 64bit code.
> > > >>> + gdb checks for int3 in case of SIGTRAP, this fails because
> > > >>> + Wow64GetThreadContext can only report the pc of 32bit code, and
> > > >>> + gdb lets the target process continue.
> > > >>> + So handle it as SIGINT instead, then the target is stopped
> > > >>> + unconditionally. */
> > > >>> DEBUG_EXCEPTION_SIMPLE ("EXCEPTION_BREAKPOINT");
> > > >>> rec->ExceptionCode = DBG_CONTROL_C;
> > > >>> ourstatus->value.sig = GDB_SIGNAL_INT;
> > > >>
> > > >> That is fine with me, thanks.
> > > >>
> > > >> Just to make sure I understand, stopping a 32-bit process from a 64-bit
> > > >> GDB is the only time we expect this to happen, right?
> > >
> > > Ok, thanks. Please go ahead and merge.
> >
> > Pushed, thanks.
> >
> > I think it would be great to have this in the gdb-10-branch.
> > Would that be possible?
>
>
> OK for me, Hannes.
Thanks, pushed as well to gdb-10-branch.
Hannes
prev parent reply other threads:[~2020-09-24 17:51 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 ` Hannes Domani via Gdb-patches
2020-09-23 17:21 ` [PATCH 2/3] Revert "Fix ctrl-c when debugging WOW64 processes" Hannes Domani via Gdb-patches
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 [this message]
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=1994899713.688642.1600969868909@mail.yahoo.com \
--to=gdb-patches@sourceware.org \
--cc=brobecker@adacore.com \
--cc=simark@simark.ca \
--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