Manoj Srivastava wrote: > On Tue, Aug 11 2009, Josselin Mouette wrote: > >> Le mardi 11 août 2009 à 08:24 -0500, Manoj Srivastava a écrit : >>> Hmm. I see very little benefit here. Firstly, to use build id, >>> you have to intercept the upstream build system and add --build-id >>> (and perhaps the --build-id-style) option to ld, instead of the current >>> method of letting the upstream build happen and working on the produced >>> objects -- this is more intrusive. And what do we gain? >> Without build IDs, GDB has no sure way to map the binary to the correct >> detached symbols. Therefore it will read the whole file to compute its >> CRC32 (!) and compare it to the one stored in the gnu_debuglink section >> of the binary. >> >> This sole issue is responsible for gdb taking up to several minutes to >> produce a backtrace for binaries using big libraries like xulrunner. And >> don’t even think of using the debugging symbols over the network in this >> case. > > Yes, that would indeed be silly -- if you have managed to > intercept ld and added --build-id to the executable, it would be silly > not to have the file in the location gdb will look in. > > However, if you do not use the build-id mechanism, and use what > we currently use in dh_strip and friends, objcopy --add-gnu-debuglink > adds information that gdb looks at to figure out where the debug > symbols live -- and no CRC check sum is ever performed.
It still is AFAIK: * The executable contains a "debug link" that specifies the name of the separate debug info file. The separate debug file's name is usually `EXECUTABLE.debug', where EXECUTABLE is the name of the corresponding executable file without leading directories (e.g., `ls.debug' for `/usr/bin/ls'). In addition, the debug link specifies a CRC32 checksum for the debug file, which GDB uses to validate that the executable and the debug file came from the same build. That says the debug link contains the CRC checksum. But GDB still needs to perform it to make sure it matches that of the debug file. Cheers, Emilio
signature.asc
Description: OpenPGP digital signature