From: "Paul Koning" <Paul_Koning@Dell.com>
To: <gdb@sourceware.org>
Subject: Two threads hitting the same break
Date: Thu, 18 Mar 2010 19:27:00 -0000 [thread overview]
Message-ID: <D8CEBB6AE9D43848BD2220619A43F326538E20@M31.equallogic.com> (raw)
Gentlepeople,
I'm running into a problem in trying to add threads support for NetBSD
to GDB.
The situation is a breakpoint set in a function that is called by
multiple threads. One thread hits the break. It gets the signal, the
process stops, GDB gets control, and sees what it expects.
I then tell GDB to continue. It does a stepi, reinserts the break, and
lets the process go. But the other thread has also hit the same
breakpoint. That signal is delivered at the time I do the continue --
so at that point the break instruction isn't present. The result is
that GDB sees this as a SIGTRAP at break address + 1 (this is on i386),
and when I continue I get a segfault because the thread is continued in
the middle of an instruction.
I think I've seen discussion of this sort of issue, possibly in the
code, but I'm not having much luck finding it. Any suggestions for the
right way to handle this?
paul
next reply other threads:[~2010-03-18 19:27 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-18 19:27 Paul Koning [this message]
2010-03-18 19:36 ` Pedro Alves
2010-03-18 20:02 ` Paul Koning
2010-03-18 20:09 ` Paul Koning
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=D8CEBB6AE9D43848BD2220619A43F326538E20@M31.equallogic.com \
--to=paul_koning@dell.com \
--cc=gdb@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