From: "Ulrich Weigand" <uweigand@de.ibm.com>
To: dje@google.com (Doug Evans)
Cc: gdb-patches@sourceware.org
Subject: Re: [RFA] Fix hand called function when another thread has hit a bp.
Date: Sun, 14 Dec 2008 22:14:00 -0000 [thread overview]
Message-ID: <200812142213.mBEMDAFX019852@d12av02.megacenter.de.ibm.com> (raw)
In-Reply-To: <e394668d0812141359x30734dfdxab254c5a2b58060f@mail.gmail.com> from "Doug Evans" at Dec 14, 2008 01:59:29 PM
Doug Evans wrote:
> >> Adding the above to the end of the testcase reveals the fact that this
> >> patch causes gdb to lose track of the fact that it needs to single
> >> step over the breakpoint at all_threads_running in the main thread,
> >> and resuming execution causes the breakpoint to be hit again. Global
> >> state, gotta love it.
> >>
> >> I'm assuming non-stop mode doesn't have this problem.
> >> Can we record in struct thread_info (or some such) the last stop
> >> reason and before resuming with !scheduler-locking iterate over all
> >> threads, single stepping them as necessary? Is there a better
> >> solution?
> >
> > This patch fixes the expanded hand-call-in-threads.exp testcase (which
> > is part of the patch). In the process I discovered a bigger problem -
> > gdb doesn't handle resuming after more than one thread is stopped at a
> > breakpoint. This can happen if the user runs several threads in turn
> > with scheduler-locking on, and then turns scheduler-locking off and
> > resumes the program. I wrote another testcase,
> > multi-bp-in-threads.exp, to expose this issue. Fixing this appears to
> > be a much harder problem, and I think I'd like to declare partial
> > victory with this patch ...
I'm not sure this is the right approach -- how can we be sure those
breakpoints in other threads have already been reported to the user?
The original code specifically steps only over the one breakpoint that
was reported when GDB last stopped. If other threads hit breakpoints
simultaneously, we *want* them to trigger again, so that they can be
properly reported to the user ...
Why does this not work for your test case?
Bye,
Ulrich
--
Dr. Ulrich Weigand
GNU Toolchain for Linux on System z and Cell BE
Ulrich.Weigand@de.ibm.com
next prev parent reply other threads:[~2008-12-14 22:14 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-12-02 3:01 Doug Evans
2008-12-02 3:48 ` Doug Evans
2008-12-02 11:41 ` Doug Evans
2008-12-14 22:00 ` Doug Evans
2008-12-14 22:14 ` Ulrich Weigand [this message]
2008-12-15 22:07 ` Doug Evans
2008-12-15 22:50 ` Ulrich Weigand
2008-12-15 23:15 ` Doug Evans
2008-12-17 19:14 ` Ulrich Weigand
2009-02-24 10:42 ` Doug Evans
2009-03-13 17:06 ` Doug Evans
2009-03-29 13:36 ` Doug Evans
2009-03-30 18:48 ` Ulrich Weigand
2009-04-03 23:25 ` Doug Evans
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=200812142213.mBEMDAFX019852@d12av02.megacenter.de.ibm.com \
--to=uweigand@de.ibm.com \
--cc=dje@google.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