From: jjohnstn <jjohnstn@redhat.com>
To: Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
Cc: gdb-patches@sources.redhat.com, <eliz@gnu.org>
Subject: Re: [RFC]: x86 threaded watchpoint support [2/3]
Date: Wed, 16 Jun 2004 21:39:00 -0000 [thread overview]
Message-ID: <Pine.LNX.4.44.0406161722440.7927-100000@tooth.toronto.redhat.com> (raw)
In-Reply-To: <OFF5869FA1.2D688740-ONC1256EB4.005301A9-C1256EB4.0053F74D@de.ibm.com>
On Tue, 15 Jun 2004, Ulrich Weigand wrote:
>
>
>
>
> Jeff Johnston wrote:
>
> >The change is needed because with the threading model, you can have
> >multiple events to process. So, if you check your watchpoint values,
> >all of them may have changed but you end up reporting an invalid thread
> >location. For example, I was getting watchpoints changing at the same
> >time of a new thread event (it couldn't discern).
>
> Isn't it enough to know whether you got the SIGTRAP because of a (any)
> hardware watchpoint, or for some other reason (e.g. new thread event)?
>
> *This* information is available on s390, and as of this patch:
> http://sources.redhat.com/ml/gdb-patches/2004-05/msg00290.html
> it is actually used to prevent bpstat_stop_status to recognize
> a watchpoint event unless the kernel says it was a watchpoint ...
>
Actually, I believe this patch needs to be reworked. It is causing a
failure for ia64 watchpoints. There are a number of problems to be looked
at. First of all, the stopped_by_watchpoint flag only gets set if
HAVE_CONTINUABLE_WATCHPOINT is true. Thus, any platform that doesn't
define this macro or have the low level target
to_have_continuable_watchpoint value set, will never set the
stopped_by_watchpoint flag. The logic in
bpstat_stop_status ignores all hardware watchpoints if the flag is not set
so we never do the value comparison.
Another problem is that some watchpoints are stepped (i.e. the signal
occurs before the value is actually changed). When we step over the
watchpoint, again the flag won't get set because we have actually trapped
due to a step operation, not a watchpoint.
> Do you have more details about n what situation is this still
not > enough?
>
Knowing at least one watchpoint triggered is not enough detail. Gdb then
has to check all values for change. We may not stop all threads until
multiple watchpoints change. Now, imagine you have 1000 threads. Even
if we get one thread correct, the end-user has to do an info threads and search
the other 999 threads to figure out where the other values got changed. I
personally use a watchpoint when I know a value has changed but can't
figure out why it changed or there is some particular transition of value
I am interested in. In some cases, gdb won't be able to tie the
thread to the watchpoint but where we can do so, we definitely should.
-- Jeff J.
>
> Mit freundlichen Gruessen / Best Regards > > Ulrich Weigand
>
> --
> Dr. Ulrich Weigand
> Linux for S/390 Design & Development
> IBM Deutschland Entwicklung GmbH, Schoenaicher Str. 220, 71032 Boeblingen
> Phone: +49-7031/16-3727 --- Email: Ulrich.Weigand@de.ibm.com
>
>
next prev parent reply other threads:[~2004-06-16 21:39 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-06-15 15:22 Ulrich Weigand
2004-06-16 21:39 ` jjohnstn [this message]
2004-06-17 4:24 ` Eli Zaretskii
2004-06-17 19:47 ` Jeff Johnston
-- strict thread matches above, loose matches on Subject: below --
2004-06-14 14:07 Ulrich Weigand
2004-06-11 21:33 Jeff Johnston
2004-06-12 9:42 ` Eli Zaretskii
2004-06-14 21:40 ` Jeff Johnston
2004-06-15 4:23 ` Eli Zaretskii
2004-06-15 12:22 ` 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=Pine.LNX.4.44.0406161722440.7927-100000@tooth.toronto.redhat.com \
--to=jjohnstn@redhat.com \
--cc=Ulrich.Weigand@de.ibm.com \
--cc=eliz@gnu.org \
--cc=gdb-patches@sources.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