Hi, I 'm trying to figure out why LLVM emits broken DWARF debug info on Windows. When I load executable in gdb it says "DW_FORM_strp pointing outside of .debug_str section [in module ... ]" It looks like this issue had been previously reported here [1]<http://lists.cs.uiuc.edu/pipermail/cfe-dev/2012-October/025291.html>, [2] <http://lists.cs.uiuc.edu/pipermail/llvmdev/2012-October/054751.html>. I am still seeing this error with clang compiled from master branch (as well as in 3.3 and 3.2). So I compared asm emitted by clang with that created by gcc, and the difference seems to be that for inter-debug-section references gcc uses .secrel32 <label> directive, whereas clang uses .long <label>. After manually replacing .long's with .secrel32's and building executable, gdb seemed to like new debug info a lot more! I am not sure what's the right approach for fixing this. Should .secrel32 be used on all platforms, or just for Windows PE-COFF? Can somebody familiar with intricacies of DWARF format on different platforms please comment of this? thanks! Vadim -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130606/6799c354/attachment.html>
Anton Korobeynikov
2013-Jun-06 21:54 UTC
[LLVMdev] Fwd: LLVM generates broken debug info on Windows
> I am not sure what's the right approach for fixing this. Should .secrel32 > be used on all platforms, or just for Windows PE-COFF? Can somebody > familiar with intricacies of DWARF format on different platforms please > comment of this?section-relative offsets should be used on COFF. Can you fill the PR with short reproducer? Thanks! -- With best regards, Anton Korobeynikov Faculty of Mathematics and Mechanics, Saint Petersburg State University
Apparently Analagous Threads
- [LLVMdev] relocation visitor
- [LLVMdev] LLVM generates broken debug info on Windows
- [LLVMdev] [lldb-dev] How is variable info retrieved in debugging for executables generated by llvm backend?
- GDB doesn't work with IR-originated debug info
- [LLD] Support DWARF64, debug_info "sorting"