[cfe-commits] Updated PATCH - Clang DebugInfo Patch for StopPoints/Regions.
Chris Lattner
clattner at apple.com
Wed May 7 22:52:06 PDT 2008
On May 7, 2008, at 3:00 AM, Sanjiv.Gupta at microchip.com wrote:
>
>> http://www.llvm.org/docs/SourceLevelDebugging.html
>>>> mentions that.
>>> I'd suggest just not doing that :)
>> It's probably a good idea to still stop on the closing } of a
>> function. Normal gcc + gdb also does that IIRC and it helps
>> to see when you're exiting a function. Not sure if this is
>> also under discussion, though.
>>
>> Gr.
>>
>> Matthijs
>>
> I have included an updated patch here for line number and region
> information.
> It takes care of previous comments from Chris.
>
> I will send a separate patch for removing ending "." from option
> descriptions.
>
> EmitRegionEnd() still calls EmitStopPoint(). We can remove that call
> once we have an agreement on that subject.
>
> Please let me know if there are more things to be fixed.
>
> The next thing I am working on is generating subprogram descriptors.
This is looking great to me. Please commit after this minor tweaks:
/// EmitRegionStart - Emit a call to llvm.dbg.region.start to
indicate start
/// of a new block
void EmitRegionStart(llvm::Function *Fn, llvm::IRBuilder &Builder);
/// EmitRegionEnd - Emit call to llvm.dbg.region.end to indicate
end of a
/// block
void EmitRegionEnd(llvm::Function *Fn, llvm::IRBuilder &Builder);
Please end sentence-like comments with proper punctuation ("." in this
case).
uint64_t CurLineNo = SM.getLineNumber(CurLoc);
uint64_t ColumnNo = SM.getColumnNumber(CurLoc);
// Invoke llvm.dbg.stoppoint
Builder.CreateCall3(StopPointFn, ...
This will abort if 'CurLoc' came from a macro expansion. In this
case, you want the 'logical' location, so please change these to
'getLogicalLineNumber' etc.
Thanks!
-Chris
More information about the cfe-commits
mailing list