[LLVMdev] Debug information under windows

Daniel Kłobuszewski daniel.klobuszewski at ibs.org.pl
Mon Oct 29 02:16:05 PDT 2012


I was manually running generated binaries under gdb and using objdump to 
analyze their debug symbols. I do not have a script for that.

Basically what needs to be checked is whether or not offsets to 
.debug_<something> sections (e.g. DW_FORM_strp, DW_AT_ranges) are valid.

W dniu 2012-10-26 22:46, Rafael Espíndola pisze:
> Can you add some tests?
>
> On 26 October 2012 10:55, Daniel Kłobuszewski
> <daniel.klobuszewski at ibs.org.pl> wrote:
>> Hello,
>>
>> Recently I found binaries produced with LLVM impossible to debug under
>> Windows. This was probably related to the following bug:
>> http://llvm.org/bugs/show_bug.cgi?id=13636
>>
>> Asm generated from .ll files revealed that some offsets to debug information
>> were incorrect: they were absolute instead of relative to their sections.
>>
>> Following patch seemed to have repaired the problem, so I'm just leaving it
>> here. Hopefully this will help someone.
>>
>> Regards,
>> Daniel
>>
>>
>> diff -r 547972237a05 -r 6ed9378f04a3 lib/MC/MCAsmInfoCOFF.cpp
>> --- a/lib/MC/MCAsmInfoCOFF.cpp  Wed Oct 10 20:39:45 2012 +0200
>> +++ b/lib/MC/MCAsmInfoCOFF.cpp  Thu Oct 18 12:41:27 2012 +0200
>> @@ -38,6 +38,10 @@
>>     HasMicrosoftFastStdCallMangling = true;
>>
>>     SupportsDataRegions = false;
>> +
>> +  DwarfUsesLabelOffsetForRanges = false;
>> +  DwarfRequiresRelocationForSectionOffset = false;
>> +  DwarfUsesRelocationsForStringPool = false;
>>   }
>>
>>   void MCAsmInfoMicrosoft::anchor() { }
>>
>> _______________________________________________
>> LLVM Developers mailing list
>> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev




More information about the llvm-dev mailing list