From: Jan Kratochvil <jan.kratochvil@redhat.com>
To: Joel Brobecker <brobecker@adacore.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [patch 2/4] Fix hw watchpoints: reordered / simultaneously hit [fixup #1]
Date: Tue, 13 Oct 2009 16:02:00 -0000 [thread overview]
Message-ID: <20091013160154.GA29316@host0.dyn.jankratochvil.net> (raw)
In-Reply-To: <20091012155916.GA20031@host0.dyn.jankratochvil.net>
On Mon, 12 Oct 2009 17:59:16 +0200, Jan Kratochvil wrote:
> This patch also changes the former sentence in the doc which I was not aware
> of before as internally x86 was violating this rule:
> Then @value{GDBN} calls @code{target_stopped_data_address} exactly
> once.
> But maybe if this rule is still valid linux_nat_stopped_data_address can be
> dropped and I should rework the patchset including this patch instead.
While thinking about it:
* GDB already was violating this rule calling it twice "if (debug_infrun)"
(infrun.c line 2836) block of handle_inferior_event.
* GDB already was violating this rule calling it zero times both by
"if (stepped_after_stopped_by_watchpoint)" (infrun.c line 3100) and in other
cases of "return;" above this line.
* From a design point of view I do not find it right that the only function to
query a value (target_stopped_data_address) also does + must reset it.
* The comment at update_watchpoint() describes that for modifying watchpoints
GDB needs the LWP to be stopped and so remove+reinsert cannot hurt the LWP.
remove+reinsert is now always done and the trigger must be reset on
watchpoint remove so there is no need to reset the trigger earlier.
It may start to be an issue only of someone optimizes update_watchpoint() so
that it no longer does remove+reinsert, it would need to explicitely reset
the trigger that time.
So I stand behind the patch to remove the trigger-reset from
target_stopped_data_address. In current HEAD it is missing in
i386_stopped_data_address which can be visible as a bug in my patch 1/4
testcase. The reset is present in s390_stopped_by_watchpoint - but for the
s390 it is wrong anyway as it is now in target_stopped_by_watchpoint while
gdbint.texinfo says it should be in target_stopped_data_address which is
missing on s390.
Thanks,
Jan
next prev parent reply other threads:[~2009-10-13 16:02 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-17 19:46 [patch 2/4] Fix hw watchpoints: reordered / simultaneously hit Jan Kratochvil
2009-10-02 22:13 ` [patch 2/4] Fix hw watchpoints: reordered / simultaneously hit [fixup #1] Jan Kratochvil
2009-10-02 23:01 ` Joel Brobecker
2009-10-03 17:23 ` Jan Kratochvil
2009-10-07 18:39 ` Joel Brobecker
2009-10-12 16:00 ` Jan Kratochvil
2009-10-12 18:58 ` Eli Zaretskii
2009-10-13 16:02 ` Jan Kratochvil [this message]
2009-11-03 1:12 ` Joel Brobecker
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=20091013160154.GA29316@host0.dyn.jankratochvil.net \
--to=jan.kratochvil@redhat.com \
--cc=brobecker@adacore.com \
--cc=gdb-patches@sourceware.org \
/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