From: Benedikt Spranger <b.spranger@linutronix.de>
To: gdb@sourceware.org
Subject: thread-debuging with gdbserver on ARM/NPTL
Date: Tue, 24 Oct 2006 18:29:00 -0000 [thread overview]
Message-ID: <20061024202933.1d5129b9.b.spranger@linutronix.de> (raw)
Hi,
trying to debug a simple multithreaded application with gdbserver on an
ARM eabi/NPTL based System leads to a completely confused gdbserver.
thread_code() {
BP2 do_thread_init();
pthread_lock();
do_thread_work();
pthread_unlock();
}
main() {
pthread_lock()
pthread_create()
BP1 do_something()
pthread_unlock()
}
Attaching gdb to gdbserver, set the above breakpoints and issue "cont",
then the program stops at breakpoint BP1. BP2 is never reached, although
the thread is visible via "ps" on the target system. The thread is stuck
in sys_futex and not as expected in the ptrace breakpoint trap. Also gdb
does not show that the thread was created.
This can be reproduced with glibc 2.3.6 -> 2.5, kernel 2.6.14 ->
2.6.19-rc2, gcc 3.4 -> 4.1.1 and binutils up to cvs-latest.
Benedikt Spranger
next reply other threads:[~2006-10-24 18:29 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-10-24 18:29 Benedikt Spranger [this message]
2006-10-24 18:34 ` Daniel Jacobowitz
2006-10-25 14:46 ` Robert Schwebel
2006-10-25 15:03 ` Daniel Jacobowitz
2006-10-26 9:55 ` Luotao Fu
2006-10-26 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=20061024202933.1d5129b9.b.spranger@linutronix.de \
--to=b.spranger@linutronix.de \
--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