This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] Fix for gdb.threads/staticthreads.exp failure on Linux


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]