From: Pedro Alves <palves@redhat.com>
To: Hannes Domani <ssbssa@yahoo.de>,
Gdb-patches <gdb-patches@sourceware.org>
Subject: Re: [PATCH 7/7] Reset Windows hardware breakpoints on executable's entry point
Date: Sun, 31 May 2020 16:54:15 +0100 [thread overview]
Message-ID: <033665b4-d036-83a6-2a31-88bccb802612@redhat.com> (raw)
In-Reply-To: <262511602.870722.1590593988931@mail.yahoo.com>
On 5/27/20 4:39 PM, Hannes Domani via Gdb-patches wrote:
> Am Mittwoch, 27. Mai 2020, 16:48:16 MESZ hat Pedro Alves <palves@redhat.com> Folgendes geschrieben:
>> The answer at <https://stackoverflow.com/questions/5925542/how-can-i-set-break-point-on-my-function-and-list-its-source>,
>> seems to confirm it:
>>
>> "If you debugger sets some registry values right now, those changes would not
>> matter, because OS will override all register values while starting executing
>> process. "
>>
>> Interestingly, it also says:
>>
>> "Workaround is simple -- first make a single step using t instruction, then you
>> can use hardware breakpoints as you like."
>>
>> Which makes it sounds like a single-step is all it takes to get to the entry point.
>> That may make it easier to implement this inside do_initial_windows_stuff,
>> including doing the same thing in gdbserver.
>
> I just tried:
...
> So after a nexti the hardware breakpoint still didn't work, because at this
> point it's far before the overwriting of the context.
>
OK, thanks for trying it out.
> Or did you mean this different?
No, I was misled by the comments in stackoverflow, which are clearly incorrect.
Meanwhile I found this, which explains this mechanism in more detail:
http://www.nynaeve.net/?p=81
> Anyways, since there is a simple workaround to make the hardware breakpoints
> work (just use "start"), it doesn't matter much to me if this gets fixed.
I think that it's nice to make this work transparently; I was just
exploring the best way to do so. Let me take another look at the patch.
Thanks,
Pedro Alves
next prev parent reply other threads:[~2020-05-31 15:54 UTC|newest]
Thread overview: 44+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20200525185659.59346-1-ssbssa.ref@yahoo.de>
2020-05-25 18:56 ` Windows testsuite failures Hannes Domani
2020-05-25 18:56 ` [PATCH 1/7] Fix function argument and return value locations Hannes Domani
2020-05-25 21:02 ` Simon Marchi
2020-05-25 21:32 ` Hannes Domani
2020-05-25 22:14 ` Simon Marchi
2020-05-25 23:03 ` Hannes Domani
2020-05-26 16:14 ` Simon Marchi
2020-05-26 20:43 ` Tom Tromey
2020-05-25 18:56 ` [PATCH 2/7] Handle Windows drives in auto-load script paths Hannes Domani
2020-05-26 16:04 ` Jon Turney
2020-05-26 16:31 ` Hannes Domani
2020-05-26 16:05 ` Christian Biesinger
2020-05-26 16:25 ` Hannes Domani
2020-05-26 16:31 ` Christian Biesinger
2020-05-26 16:40 ` Hannes Domani
2020-05-26 16:42 ` Christian Biesinger
2020-05-26 17:14 ` Hannes Domani
2020-05-25 18:56 ` [PATCH 3/7] Handle Windows drives in rbreak paths Hannes Domani
2020-05-25 18:56 ` [PATCH 4/7] Use errno value of first openp failure Hannes Domani
2020-05-26 20:37 ` Tom Tromey
2020-05-25 18:56 ` [PATCH 5/7] Close file handle of empty history file Hannes Domani
2020-05-26 16:37 ` Christian Biesinger
2020-05-26 17:42 ` Hannes Domani
2020-05-27 14:33 ` Tom Tromey
2020-05-27 17:37 ` Hannes Domani
2020-05-27 18:27 ` Christian Biesinger
2020-05-25 18:56 ` [PATCH 6/7] Move exit_status_set_internal_vars out of GLOBAL_CURDIR Hannes Domani
2020-05-26 20:45 ` Tom Tromey
2020-05-27 17:50 ` Hannes Domani
2020-05-25 18:56 ` [PATCH 7/7] Reset Windows hardware breakpoints on executable's entry point Hannes Domani
2020-05-27 12:07 ` Pedro Alves
2020-05-27 14:48 ` Pedro Alves
2020-05-27 15:39 ` Hannes Domani
2020-05-31 15:54 ` Pedro Alves [this message]
2020-05-31 16:37 ` Pedro Alves
2020-06-07 12:56 ` Hannes Domani
2020-07-08 17:43 ` Hannes Domani
2020-10-09 18:22 ` Pedro Alves
2020-10-09 18:51 ` Hannes Domani via Gdb-patches
2020-10-12 11:13 ` Pedro Alves
2020-10-12 17:21 ` Tom Tromey
2020-10-12 17:22 ` Tom Tromey
2020-05-28 18:15 ` Windows testsuite failures Christian Biesinger
2020-05-28 18:37 ` 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=033665b4-d036-83a6-2a31-88bccb802612@redhat.com \
--to=palves@redhat.com \
--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