[llvm-commits] [PATCH] Debug info utilities and printer pass

Török Edwin edwintorok at gmail.com
Fri Dec 12 00:07:18 PST 2008


On 2008-12-11 13:55, Török Edwin wrote:
> On 2008-12-11 04:13, Chris Lattner wrote:
>   
>> On Dec 10, 2008, at 1:13 PM, Devang Patel wrote:
>>     
>>>> 02-intrin.patch:
>>>> Introduce DbgFuncStart::getDisplayName() (which refers to unmangled C
>>>> ++
>>>> name!), and DbgDeclareInst::getVariableName()
>>>> Introduce include/llvm/Support/DebugInfo.h:
>>>>         
>>> We already have include/llvm/Analysis/DebugInfo.h, so I suggest that
>>> you use another name for this new header.
>>>       
>> More strongly, why do we need this new code when we have
>> llvm/Analysis/Debuginfo.h?  What does this do that
>> llvm/Analysis/DebugInfo doesn't, or shouldn't do?
>>     
>
> llvm/Analysis/DebugInfo.h doesn't search for the debug info, you have to
> give it that as a parameter to the constructor.
> My functions search for the llvm.dbg.stoppoint given an
> Instruction*/BasicBlock*, and for llvm.dbg.declare given a Value*.
>   
>> I'd really rather make Analysis/DebugInfo.h better rather than
>> introduce a new parallel way to analyze debug info.
>>     
>
> I moved the functions to include/llvm/Analysis/DebugInfo.h, see
> 02-dbginfo-utils.patch.
>
> Attachments:
> 01-dbginfo.patch:
> -  fix getFieldAs(), it was always looking at field 6, instead of Elt!
> -  DIVariable.getType() was leading to linker error: undefined reference
> to DIType::DIType(GlobalVariable *GV), define the constructor
>
> 02-dbginfo-utils.patch:
> - in my previous patch this was include/llvm/Support/DebugInfo.h, it
> introduces:
> - findStopPoint
> - findBBStopPoint
> - findDbgDeclare
>
> 03-pass.patch:
> - the -print-dbginfo pass from my previous email, now it uses
> llvm/Analysis/DebugInfo.h
> - caveats: derived types are printed as "", no testcase (should I add one?)
>   

Are these OK to commit?

Best regards,
--Edwin



More information about the llvm-commits mailing list