This is the mail archive of the libc-help@sourceware.org mailing list for the glibc 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: How to build Debug version of glibc


Carlos O'Donell wrote:
> To build a debug version of glibc you must build with debugging
> enabled e.g. CFLAGS="-O2 -g" and CPPFLAGS="-O2 -g".
>
>   
>> Some more questions I'm interested:
>>
>> 1. For glibc developers themselves, do they build debug versions of glibc?
>>     
> I build glibc with the above makefile flags.
>
>   
>> 2. If they do, how do they debug it, use command line gdb, or a GUI frontend
>> of gdb? If later, which do they use?
>>     
> I primarily use command-line gdb to debug glibc.
>
> Cheers,
> Carlos.
>   
Thank you Carlos, but there is still one question remain. What is the
proper and conventional way to install a debug version and release
version of glibc side by side, and when calling gcc to link an
executable, how should I tell gcc which version of glibc to link?

Microsoft does this by naming his debug/release CRT library different
names(the importlibs named MSVCRTD.LIB vs MSVCRT.LIB), and provides
compiler options -MDd vs -MD; these options puts in obj a linker
directive( -defaultlib:MSVCRTD vs -defaultlib:MSVCRT) so different
flavor of the CRT gets linked.

I think installing a debug version of glibc side by side with the
pre-installed one is important, otherwise, I have to overwrite the
pre-installed one provided by Linux distribution, which may cause the
danger of failing some pre-installed software in my Linux box to fail,
right?


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