This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB 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] |
Environment: gdb-weekly-CVS-7.2.50.20110125, binutils 2.21, gcc 4.4.3, Linux, i686, 32 bit kernel 2.6.32.
If I create -Od -g3 executable with -Wl,compressed-debug-sections=zlib using gold linker or compress debug-info via objcopy I have problems with local variables and bacttraces in gdb. Something like this: gdb: bt .... #11 0xb2356a74 in Core::WorkerImpl::WorkerThread (this=Could not find the frame base for "Core::WorkerImpl::WorkerThread()". ) ....
I've spend some time and, looks like, found the problem. It is in dwarf2_symbol_mark_computed function (dwarf2read.c). Check "DW_UNSND (attr) < dwarf2_per_objfile->loc.size" is incorrect if compressed section is used. In this case loc.size contains compressed section size, not decompressed one. It happens if the section has not been read via dwarf2_read_section yet. But dwarf2_locate_sections has been done. As result symbols not passed above verification are left with size==0 and data==NULL after dwarf2_symbol_mark_computed function.
The patch idea is to introduce uncompressed_size field in struct dwarf2_section_info. And fill it in dwarf2_locate_sections. Check in dwarf2_symbol_mark_computed function takes into account uncompressed_size. The patch is quite large cause I try to avoid code duplication with zlib_decompress section.
Best regards Vladimir Simonov
Attachment:
gdb-7.2-compressed-section.diff
Description: Text document
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |