Setting up libc6 sources for analysis on Debian/Ubuntu May 31, 2008
Posted by lizardo in Debian/Ubuntu, Linux.add a comment
I used to work on development of a tracing tool at work, that required me reading some glibc code to understand internals of core library functions (following the “Use the source, Luke” Open Source principle for developer documentation). I use Ubuntu, so it seemed simpler to use its glibc sources so I don’t have to recompile glibc myself. Here are the instructions I use for setting up my environment for glibc code navigation (tested on Hardy running on x86):
# gcc 4.2 is required to configure libc6 $ sudo apt-get install build-essential gcc-4.2 # download sources $ sudo apt-get source libc6 $ cd glibc-2.6.1/ # the "configure_i686" rule also calls other rules that # unpack the sources and apply distro-specific patches $ ./debian/rules configure_i686 # create a tags file to easily navigate between functions with Vim $ cd build-tree/glibc-2.6.1/ && ctags -R --exclude=.pc