gdb not working with older glibc

Andrew Cagney ac131313@redhat.com
Tue Nov 11 16:32:00 GMT 2003


> Well that pretty much was the exact output.
> Here's the version info too:
> 
> GNU gdb 6.0
> Copyright 2003 Free Software Foundation, Inc.
> GDB is free software, covered by the GNU General Public License, and you
> are
> welcome to change it and/or distribute copies of it under certain
> conditions.
> Type "show copying" to see the conditions.
> There is absolutely no warranty for GDB.  Type "show warranty" for
> details.
> This GDB was configured as "i686-pc-linux-gnu"...

Sigh.  More recent GDB's print out the libthread_db that was loaded 
here.  Guess that didn't get into 6.0.

> (gdb) run
> Starting program:
> /path/(name-omitted)
> 
> Program received signal SIG32, Real-time event 32.
> 0x0811c7f6 in __sigsuspend (set=0xbffff380) at
> ../sysdeps/unix/sysv/linux/sigsuspend.c:45
> 45      ../sysdeps/unix/sysv/linux/sigsuspend.c: No such file or
> directory.
>         in ../sysdeps/unix/sysv/linux/sigsuspend.c
> Current language:  auto; currently c
> 
> And for gdb 6.0 working, it's just the same thing without the error/crash.

Anyway, this is the problem:

>> The problem is most likely that GDB is loading the lated libthread_db
>> and that library is refusing to debug the older glibc.
>>
>> Perhaphs there should be a "set libthread_db ... command?"

you need to force GDB into loading the correct libthread_db library.  I 
guess using something like LD_LIBRARY_PATH?  Or perhaphs overriding 
gdb/thread-db.c:#define LIBTHREAD_DB_SO?

Andrew




More information about the Gdb mailing list