From: "Eli Zaretskii" <eliz@gnu.org>
To: Jeff Johnston <jjohnstn@redhat.com>
Cc: gdb-patches@sources.redhat.com
Subject: Re: [RFC]: x86 threaded watchpoint support [2/3]
Date: Sat, 12 Jun 2004 09:42:00 -0000 [thread overview]
Message-ID: <9743-Sat12Jun2004123939+0300-eliz@gnu.org> (raw)
In-Reply-To: <40CA252E.8050109@redhat.com> (message from Jeff Johnston on Fri, 11 Jun 2004 17:33:34 -0400)
> Date: Fri, 11 Jun 2004 17:33:34 -0400
> From: Jeff Johnston <jjohnstn@redhat.com>
>
> The most major change is that a check has been added for a
> hardware_watchpoint to ensure that the stopped data address matches
> the watchpoint address.
I don't necessarily object to this change, but could you first explain
why is this needed, while it was never needed before? (I have my
guess for the answer, but I'd like to hear yours.)
I have also a minor comment about the change itself, see below.
> @@ -2683,45 +2688,100 @@ bpstat_stop_status (CORE_ADDR bp_addr, p
> if (b->type == bp_watchpoint ||
> b->type == bp_hardware_watchpoint)
> {
> - char *message = xstrprintf ("Error evaluating expression for watchpoint %d\n",
> + CORE_ADDR addr;
> + struct value *v;
> + int found = 0;
> +
> + /* If we have a hardware watchpoint, ensure that the address
> + being watched caused the trap event. */
> + if (b->type == bp_hardware_watchpoint)
> + {
> + addr = target_stopped_data_address ();
> + if (addr == 0)
> + {
> + /* Don't stop. */
> + bs->print_it = print_it_noop;
> + bs->stop = 0;
> + continue;
> + }
> + for (v = b->val_chain; v; v = v->next)
It looks to me that this change makes the bp_hardware_watchpoint case
exactly identical to bp_read_watchpoint and bp_access_watchpoint, is
that right? If so, why not add bp_hardware_watchpoint to the if
clause that handles read and access watchpoints, and leave only
bp_watchpoint alone with the current code?
next prev parent reply other threads:[~2004-06-12 9:42 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-06-11 21:33 Jeff Johnston
2004-06-12 9:42 ` Eli Zaretskii [this message]
2004-06-14 21:40 ` Jeff Johnston
2004-06-15 4:23 ` Eli Zaretskii
2004-06-15 12:22 ` Daniel Jacobowitz
2004-06-14 14:07 Ulrich Weigand
2004-06-15 15:22 Ulrich Weigand
2004-06-16 21:39 ` jjohnstn
2004-06-17 4:24 ` Eli Zaretskii
2004-06-17 19:47 ` Jeff Johnston
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=9743-Sat12Jun2004123939+0300-eliz@gnu.org \
--to=eliz@gnu.org \
--cc=gdb-patches@sources.redhat.com \
--cc=jjohnstn@redhat.com \
/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