[LLVMdev] Debug Information for LLVM 2.6 and TOT

Richard Pennington rich at pennware.com
Thu Nov 5 11:39:05 PST 2009


Devang Patel wrote:
> This is because, while cloning function body during inlining, the
> location information is also cloned, as expected. However, the inliner
> should update location information to indicate that this instruction
> is inlined at this location. I have local patch in my tree that is
> waiting finishing touch in codegen before I commit. I pasted it below
> for your reference.
> 
> Now, each instruction can have location information attached with it.
> The location info (DILocation) include
> - unsigned - line number
> - unsigned - col number
> - DIScope - lexical scope
> - DILocation - inlined at location
> 
> When an instruction is inlined, the first three fields will stay
> unchanged. But the inlined instruction will have non null "inlined at
> location" indicating where this instruction was inlined.

Devang,

Could this approach be used for macros? I can single step through macro 
bodies, but I can't set a breakpoint at the point of the macro 
invocation. It sounds like this will allow it.

http://ellcc.org/images/ssmacros.png

-Rich



More information about the llvm-dev mailing list