[LLVMdev] RFC: debug_line Emission

Bill Wendling isanbard at gmail.com
Sun Jul 20 03:07:24 PDT 2008


On Jul 18, 2008, at 10:45 AM, Evan Cheng wrote:

> On Jul 17, 2008, at 3:33 PM, Bill Wendling wrote:
>
>> In CodeGen/DwarfWriter.cpp's EmitDebugLine file, these lines are
>> causing havoc on Mac OS X systems:
>>
>>   // If there are no lines to emit (such as when we're using .loc
>> directives
>>   // to emit .debug_line information) don't emit a .debug_line
>> header.
>>   if (SectionSourceLines.empty())
>>     return;
>
> The fix is to move the early exist to just below this line:
> EmitLabel("line_prolog_end", 0), right?
>
No. We still need the emission of some of the labels after this. So it  
would get rid of the if-statement altogether. However, Dan came up  
with a better solution. :-)

>> By removing the "early exit" from EmitDebugLine, I got LLVM to
>> generate this data. However, Dan pointed out that assemblers that use
>> the ".loc" directive can't have their debug_line generated by the
>> compiler. My suggestion was to have a flag that indicated that ".loc"
>
> I am not sure I understand this statement?
>
Now that I read it, neither can I. :-) I was trying to say that  
the .loc and .file directives are there to indicate that the assembler  
should generate the debug_line section -- with line tables, etc. So  
the compiler shouldn't be outputting those sections.

-bw




More information about the llvm-dev mailing list