[uClibc] uclibc gdb and threads
Manuel Novoa III
mjn3 at codepoet.org
Fri Nov 5 19:04:06 UTC 2004
On Fri, Nov 05, 2004 at 02:07:02PM +0000, Andrew de Quincey wrote:
> Hi - I'm having slightly more progress here. I'm getting symbols now. Although
> objdump still claims there aren't any - my guess is a crosscompiled objdump
> has a bug.
>
> I'm remote debugging using gdb/gdbserver 6.2.1, compiled with roughly these
> instructions: http://www.kegel.com/linux/gdbserver.txt.
>
> Note I'm not using hardhat - as I said previously its gcc 3.3.4 from the
> uclibc "toolchain" scripts. GDB is compiled against this version of uclibc.
>
> First issue is that breakpoints dont seem to be working - I can set them, but
> the execution never stops. However I don't need those right now, although
> they would be *useful*.
>
> The main concern for me is now threaded debugging. I keep getting "Program
> received signal SIG32, Real-time event 32." messages in GDB.
>
> I've seen these before, and generally its caused by problems with
> libthread_db.so.1 - but that library is definitely resident on the target
> machine.
>
> If I run crosscompile gdb and run it on the target machine, I can see it
> claims to load libthread_db.so.1 ok:
>
> This GDB was configured as "ppc-405-linux"...Using host libthread_db library
> "/mnt/core/lib/libthread_db.so.1".
>
> However when I actually run the program, I still get "Program received signal
> SIG32, Real-time event 32.". In fact, I get about 3 of those, followed by:
>
> warning: Cannot initialize thread debugging library: generic error
> warning: Cannot initialize thread debugging library: generic error
> warning: Cannot initialize thread debugging library: generic error
> warning: Cannot initialize thread debugging library: generic error
> warning: Cannot initialize thread debugging library: generic error
> warning: Cannot initialize thread debugging library: generic error
> This GDB was configured as "ppc-405-linux"...Using host libthread_db library
> "/mnt/core/lib/libthread_db.so.1".
>
> I don't see how the libthread_db can be returning an error - I looked at the
> code, and the init function just returns "OK" always.
There are patches in buildroot for several gdb versions (including 6.2.1)
to configure for <arch>-linux-uclibc. Remote debugging of threaded apps
works on mips. Haven't tried powerpc though.
Manuel
More information about the uClibc
mailing list