* gdb.threads/linux-dp.exp test nit
@ 2003-08-17 22:05 Roland McGrath
0 siblings, 0 replies; only message in thread
From: Roland McGrath @ 2003-08-17 22:05 UTC (permalink / raw)
To: gdb
The test suite will produce:
FAIL: gdb.threads/linux-dp.exp: first thread-specific breakpoint hit
if you have debugging information for libpthread available. That is:
gdb_test "where" "print_philosopher.*philosopher.* from .*libpthread.*" \
"first thread-specific breakpoint hit"
It expects the backtrace to say "something () from libpthread.so.0" for the
frames indicating the callers in libpthread of print_philosopher. But my
backtrace looks like this:
#0 print_philosopher (n=3, left=33 '!', right=33 '!') at /home/roland/BUILD/gdb
+dejagnu-5.3.90_20030710/gdb/testsuite/gdb.threads/linux-dp.c:105
#1 0x08048aa3 in philosopher (data=0x804a094) at /home/roland/BUILD/gdb+dejagnu
-5.3.90_20030710/gdb/testsuite/gdb.threads/linux-dp.c:148
#2 0x4001c9ea in start_thread (arg=0x21) at pthread_create.c:264
#3 0x40136247 in clone () from /lib/tls/libc.so.6
The crucial line is #2, where it has source info instead of "from
libpthread". The assumption that the backtrace will look either of these
ways is bogus anyway. The threads implementation could well produce a
backtrace that didn't show a recognizable frame before `philosopher'. If
the intent of this test predicate is to make sure it's in the right thread,
it really ought to be looking at the N argument to print_philosopher in the
backtrace.
Thanks,
Roland
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2003-08-17 22:05 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-08-17 22:05 gdb.threads/linux-dp.exp test nit Roland McGrath
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).