Anton Korobeynikov
2008-Jun-16 05:14 UTC
[LLVMdev] Debugging with llvm-gcc/mingw doesn't seem to work
Hello, Argiris> Any ideas?1. Make sure, that you don't mix dwarf and stabs debug information. AFAIR, this can really mess the things 2. It can be, that debug information emitted is not correct. This is known open problem. -- With best regards, Anton Korobeynikov. Faculty of Mathematics & Mechanics, Saint Petersburg State University.
Argiris Kirtzidis
2008-Jun-16 19:24 UTC
[LLVMdev] Debugging with llvm-gcc/mingw doesn't seem to work
Anton Korobeynikov wrote:> 2. It can be, that debug information emitted is not correct. This is > known open problem. >I assume it is known problem for llvm-gcc in general and not only the mingw version, is this correct ? I say that because I tried the linux binaries and they have the same issue. -Argiris
Anton Korobeynikov wrote:> 2. It can be, that debug information emitted is not correct. This is > known open problem. >The attached patch fixes the problem with the line information. For the "AT_stmt_list" attribute of the compilation unit entry, DWARF-2 specification says:> A DW_AT_stmt_list attribute whose value is a reference to line number > information for > this compilation unit. > This information is placed in a separate object file section from the > debugging information > entries themselves. The value of the statement list attribute is the > offset in the > .debug_line section of the first byte of the line number information > for this compilation > unitDwarfWriter was using a label reference (instead of a section offset) and it was causing a problem because Windows treats section offsets differently, by emitting the ".secrel32" directive. -Argiris -------------- next part -------------- A non-text attachment was scrubbed... Name: dwarf-fix.patch Type: text/x-diff Size: 4761 bytes Desc: not available URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20080616/5df6ecbd/attachment.patch>
Looks good, please commit. Evan On Jun 16, 2008, at 11:32 PM, Argiris Kirtzidis wrote:> Anton Korobeynikov wrote: >> 2. It can be, that debug information emitted is not correct. This is >> known open problem. >> > > The attached patch fixes the problem with the line information. > > For the "AT_stmt_list" attribute of the compilation unit entry, > DWARF-2 specification says: > >> A DW_AT_stmt_list attribute whose value is a reference to line >> number information for >> this compilation unit. >> This information is placed in a separate object file section from >> the debugging information >> entries themselves. The value of the statement list attribute is >> the offset in the >> .debug_line section of the first byte of the line number >> information for this compilation >> unit > > DwarfWriter was using a label reference (instead of a section > offset) and it was causing a problem because Windows treats > section offsets differently, by emitting the ".secrel32" directive. > > > -Argiris > > <dwarf-fix.patch>_______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev