This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
gdb.threads/linux-dp.exp test nit
- From: Roland McGrath <roland at redhat dot com>
- To: gdb at sources dot redhat dot com
- Date: Sun, 17 Aug 2003 15:05:03 -0700
- Subject: gdb.threads/linux-dp.exp test nit
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