This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [patch] Fix for gdb.threads/staticthreads.exp failure on Linux
- From: Paul Pluzhnikov <ppluzhnikov at google dot com>
- To: Doug Evans <dje at google dot com>
- Cc: Michael Snyder <msnyder at vmware dot com>, "gdb-patches at sourceware dot org" <gdb-patches at sourceware dot org>
- Date: Thu, 16 Jul 2009 13:38:26 -0700
- Subject: Re: [patch] Fix for gdb.threads/staticthreads.exp failure on Linux
- References: <20090605222214.66E2976BC4@localhost> <8ac60eac0906151139w23c6cc2ag9307d73232753f65@mail.gmail.com> <8ac60eac0906220910p5750f455u1e3dc462035d50b6@mail.gmail.com> <4A3FC8CA.5070700@vmware.com> <8ac60eac0906221321r45c43a13g87a830f8dd3487ea@mail.gmail.com> <e394668d0907151825t12283c66rc1856a242d50332a@mail.gmail.com> <8ac60eac0907161248yf46afa8o2abe3b36d0f6d599@mail.gmail.com>
On Thu, Jul 16, 2009 at 12:48 PM, Paul Pluzhnikov<ppluzhnikov@google.com> wrote:
> gdb-glibc-2.7 test-glibc-2.3.6: KFAIL:
> gdb-glibc-2.3.6 test-glibc-2.3.6: no failures
Why should "how gdb built" matter here?
Because the test suite doesn't set libthread-db-search-path.
When I set verbose on, for KFAIL I see this:
(gdb) run
Starting program: staticthreads
Trying host libthread_db library: libthread_db.so.1.
Host libthread_db.so.1 resolved to: /lib/libthread_db.so.1.
td_ta_new failed: versions of libpthread and libthread_db do not match
Trying host libthread_db library: libthread_db.so.1.
Host libthread_db.so.1 resolved to: /lib/libthread_db.so.1.
td_ta_new failed: versions of libpthread and libthread_db do not match
Breakpoint 1, main (argc=1, argv=0x7fffffffdaa8) at staticthreads.c:51
51 pthread_attr_init (&attr);
When I set libthread-db-search-path correctly for the target program,
then I see the same behavior with gdb-glibc-2.7 and gdb-glibc-2.3.6:
# before the patch:
(gdb) run
Starting program: staticthreads
Trying host libthread_db library: /usr/glibc-2.3.6/lib64/libthread_db.so.1.
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/glibc-2.3.6/lib64/libthread_db.so.1".
find_new_threads_callback: cannot get thread info: generic error
(gdb) c
Continuing.
Cannot execute this command while the selected thread is running.
# no further debugging possible
# after the patch:
(gdb) run
Starting program: staticthreads
Trying host libthread_db library "/usr/glibc-2.3.6/lib64/libthread_db.so.1".
[Thread debugging using libthread_db enabled]
Warning: thread_db_find_new_threads_silently:
find_new_threads_callback: cannot get thread info: generic error
Warning: guessed host libthread_db library
"/usr/glibc-2.3.6/lib64/libthread_db.so.1".
Using host libthread_db library "/usr/glibc-2.3.6/lib64/libthread_db.so.1".
[New Thread 0x693860 (LWP 10575)]
[Switching to Thread 0x693860 (LWP 10575)]
Breakpoint 1, main (argc=1, argv=0x7fffffffdab8) at
../../../src/gdb/testsuite/gdb.threads/staticthreads.c:51
51 pthread_attr_init (&attr);
--
Paul Pluzhnikov