You have to check if the ubuntu project provides the source files for the packages they build.
The easiest solution to this problem is to build the library yourself, because stepping through optimized code is rarely useful.
But I don't know how easy it is to replace the libc, probably not very easy.