Debugging

Install debugging information and sources for selected packages
To install debugging information you can use the  feature (or alternatively the   feature) and to install the source code you need the   feature which in turn requires the. These features are integrated so they provide you with an environment where can find both the debugging information and the sources and lets you fully use its interactive debugging features.

Valgrind
You often need to have gcc debug information in order to run valgrind on any binary at all.

It is possible that valgrind refuses to launch with an error containing the following. valgrind: A must-be-redirected function valgrind: whose name matches the pattern:      strlen valgrind: in an object with soname matching:   ld-linux-x86-64.so.2

In this case, you need to :

Create a copy of the glibc ebuild in a local overlay, then edit the file sys-libs/glibc/files/eblits/common.eblit, line 206 :

and add -fno-builtin-strlen at the end of the line.

Also, aactivate the nostrip feature:

You can remove or comment out the FEATURES line after glibc is merged.