[LLVMdev] llvm dwarf debug info for locals with llvm.dbg.define
Carlo Kok
ck at remobjects.com
Sat Jul 28 04:42:43 PDT 2012
Op 27-7-2012 20:22, Eric Christopher schreef:
>
> On Jul 27, 2012, at 2:35 AM, Carlo Kok <ck at remobjects.com> wrote:
>
>> Hi,
>>
>> I had a problem with LLVM not emitting local variable info, even though
>> I had calls to llvm.dbg.define. After some tracking I found that the
>> llvm.dbg.declare (and probably value too) have to have a !dbg !nr after
>> them to get emitted at all. maybe someone can adjust
>> http://llvm.org/docs/SourceLevelDebugging.html#format_common_declare
>> that the two llvm.dbg. functions need a !dbg line info associated with them?
>
> I suppose, but a declare isn't too useful unless you know where it was declared.
> How were you constructing these declares such that they didn't
> have line information?
I used the DIBuilder class to do this.
The auto_var struct already has a line nr& file field in it to define
where it really is defined.
More information about the llvm-dev
mailing list