From: Ulrich Weigand <weigand@i1.informatik.uni-erlangen.de>
To: eliz@gnu.org
Cc: weigand@i1.informatik.uni-erlangen.de (Ulrich Weigand),
orjan.friberg@axis.com, kettenis@chello.nl,
gdb-patches@sources.redhat.com, drow@false.org
Subject: Re: Display of read/access watchpoints when HAVE_NONSTEPPABLE_WATCHPOINT
Date: Thu, 06 May 2004 21:34:00 -0000 [thread overview]
Message-ID: <200405062134.XAA05759@faui1d.informatik.uni-erlangen.de> (raw)
In-Reply-To: <u8yg7e794.fsf@gnu.org> from "Eli Zaretskii" at May 05, 2004 08:08:07 AM
> So the s390(x) has a means of telling that some watchpoint fired, but
> there's no way to know which one, is that true?
Exactly.
> If the hardware supports only write watchpoints, and since you don't
> know what address triggered a watchpoint, this would seem to imply
> that there's no way of getting awatch and rwatch commands to give
> useful results, is that right?
Yes.
> So what does GDB on the s390 do when the user tries to invoke
> awatch or rwatch?
It should probably fail; I'll make sure of this ...
> > Alternatively, we could also make the target_stopped_data_address
> > check only for read and access watch points, *not* for write
> > watchpoints ...
>
> GDB should use the result of target_stopped_data_address to find out
> which watchpoints are candidates for being a possible reason for
> causing SIGTRAP. GDB doesn't do so right now, but that's because the
> hardware watchpoints handling is an incremental modification of the
> original code that handled only software watchpoints.
Well, the current behaviour of GDB is correct on targets like s390
that cannot implement target_stopped_data_address, while your suggested
change would break such targets. May I suggest that your change be
implemented conditionally on whether the target supports it?
> So right now, target_stopped_data_address is almost an alias for
> STOPPED_BY_WATCHPOINT, but it is IMHO wrong to continue this illusion
> into the future. Therefore, I like your patch better than the
> alternative which would modify target_stopped_data_address.
Actually I didn't suggest modifying target_stopped_data_address.
I mean something like:
Index: gdb/breakpoint.c
===================================================================
RCS file: /cvs/src/src/gdb/breakpoint.c,v
retrieving revision 1.170
diff -c -p -r1.170 breakpoint.c
*** gdb/breakpoint.c 2 May 2004 00:21:41 -0000 1.170
--- gdb/breakpoint.c 6 May 2004 21:31:30 -0000
*************** bpstat_stop_status (CORE_ADDR bp_addr, p
*** 2628,2635 ****
address). Otherwise gdb won't stop on a break instruction in the code
(not from a breakpoint) when a hardware watchpoint has been defined. */
if (b->type != bp_watchpoint
! && !((b->type == bp_hardware_watchpoint
! || b->type == bp_read_watchpoint
|| b->type == bp_access_watchpoint)
&& target_stopped_data_address () != 0)
&& b->type != bp_hardware_breakpoint
--- 2628,2635 ----
address). Otherwise gdb won't stop on a break instruction in the code
(not from a breakpoint) when a hardware watchpoint has been defined. */
if (b->type != bp_watchpoint
! && b->type != bp_hardware_watchpoint
! && !((b->type == bp_read_watchpoint
|| b->type == bp_access_watchpoint)
&& target_stopped_data_address () != 0)
&& b->type != bp_hardware_breakpoint
This simply ensures that target_stopped_data_address is only ever used
for read or access watchpoints (where it is in fact required). Targets
that don't support it would still be able to support hardware write
watchpoints.
Bye,
Ulrich
--
Dr. Ulrich Weigand
weigand@informatik.uni-erlangen.de
next prev parent reply other threads:[~2004-05-06 21:34 UTC|newest]
Thread overview: 52+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-05-04 22:10 Ulrich Weigand
2004-05-05 5:08 ` Eli Zaretskii
2004-05-05 8:26 ` Orjan Friberg
2004-05-06 4:58 ` Eli Zaretskii
2004-05-06 14:21 ` Daniel Jacobowitz
2004-05-06 18:02 ` Eli Zaretskii
2004-05-06 18:05 ` Daniel Jacobowitz
2004-05-07 8:18 ` Eli Zaretskii
2004-05-06 21:34 ` Ulrich Weigand [this message]
2004-05-06 21:36 ` Daniel Jacobowitz
2004-05-07 8:22 ` Eli Zaretskii
2004-05-07 8:23 ` Eli Zaretskii
2004-05-10 17:39 ` [PATCH] Fix watchpoints on s390 Ulrich Weigand
2004-05-11 6:27 ` Eli Zaretskii
2004-05-05 13:44 ` Display of read/access watchpoints when HAVE_NONSTEPPABLE_WATCHPOINT Paul Koning
2004-05-06 5:08 ` Eli Zaretskii
2004-05-06 13:44 ` Paul Koning
2004-05-06 21:38 ` Ulrich Weigand
2004-05-06 21:49 ` Paul Koning
2004-05-07 8:18 ` Eli Zaretskii
-- strict thread matches above, loose matches on Subject: below --
2003-10-08 8:50 Orjan Friberg
2003-10-08 10:26 ` Eli Zaretskii
2003-10-08 13:36 ` Orjan Friberg
2003-10-08 16:02 ` Paul Koning
2004-04-06 10:14 ` Orjan Friberg
2004-04-06 14:22 ` Daniel Jacobowitz
2004-04-07 9:11 ` Orjan Friberg
2004-04-15 8:17 ` Eli Zaretskii
2004-04-15 13:24 ` Orjan Friberg
2004-04-16 7:18 ` Eli Zaretskii
2004-04-16 9:46 ` Orjan Friberg
2004-04-16 11:42 ` Orjan Friberg
2004-04-17 8:27 ` Eli Zaretskii
2004-04-19 14:59 ` Orjan Friberg
2004-04-22 15:08 ` Orjan Friberg
2004-04-22 15:48 ` Paul Koning
2004-04-22 18:40 ` Eli Zaretskii
2004-04-22 19:07 ` Paul Koning
2004-04-22 19:09 ` Paul Koning
2004-04-23 18:20 ` Eli Zaretskii
2004-04-23 18:22 ` Eli Zaretskii
2004-04-26 9:04 ` Orjan Friberg
2004-04-26 9:25 ` Eli Zaretskii
2004-05-01 21:18 ` Mark Kettenis
2004-05-02 4:48 ` Eli Zaretskii
2004-05-03 11:25 ` Orjan Friberg
2004-05-03 15:05 ` Andrew Cagney
2004-05-03 18:01 ` Eli Zaretskii
2004-05-03 18:36 ` Andrew Cagney
2004-05-03 17:49 ` Eli Zaretskii
2004-05-04 7:31 ` Orjan Friberg
2004-05-04 23:52 ` Daniel Jacobowitz
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=200405062134.XAA05759@faui1d.informatik.uni-erlangen.de \
--to=weigand@i1.informatik.uni-erlangen.de \
--cc=drow@false.org \
--cc=eliz@gnu.org \
--cc=gdb-patches@sources.redhat.com \
--cc=kettenis@chello.nl \
--cc=orjan.friberg@axis.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