This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
How to debug glibc?
- From: Alexei Khlebnikov <alexei dot khlebnikov at datacon dot at>
- To: "libc-alpha maililst " <libc-alpha at sources dot redhat dot com>
- Date: Thu, 13 Jan 2005 16:39:57 +0100
- Subject: How to debug glibc?
Hello.
I want to debug some parts of glibc, actually dlfcn and nptl parts
and I've faced some dificulties.
First of all, glibc is not allowing to compile itself without optimization.
Why is it so? Did I miss something?
Then, if I compile with -O1 -ggdb2, gdb doesn't see debugging symbols:
---
(gdb) bt
#0 0xffffe410 in ?? ()
#1 0xb7dab468 in ?? ()
#2 0xb7fd5ff8 in ?? () from /lib/libpthread.so.0
#3 0x00000000 in ?? ()
#4 0xb7fd0996 in __nanosleep_nocancel () from /lib/libpthread.so.0
#5 0xb7fe1ddd in pureShutdown::func () at module.cpp:71
#6 0xb7fcbb83 in start_thread (arg=0xb7dabbb0) at pthread_create.c:261
#7 0xb7e6131e in clone () from /lib/libc.so.6
---
Is it because of the optimization?
I've noticed some debug-out functions, like _dl_debug_printf(), but I
didn't find out
how to enable them. I suppose, some macro must be defined during the
compilation?
Dear developers, how the glibc debugging/fixing usually takes place?
Is there a document on debugging and fixing glibc?
Thanks in advance for help.
Regards,
Alexei.