[PATCH] Debug info: Support fragmented variables.
Manman Ren
manman.ren at gmail.com
Tue Feb 4 11:48:10 PST 2014
Noticed one copy-pasto:
/// getPieceOffset - Return the offset of this piece in bytes.
uint64_t getPieceOffset() const;
/// getPieceOffset - Return the offset of this piece in bytes.
uint64_t getPieceSize() const;
Manman
On Mon, Feb 3, 2014 at 3:41 PM, Adrian Prantl <aprantl at apple.com> wrote:
>
> Hi David,
>
> Here's the MDNodes for the two variable pieces:
> !20 = metadata !{i32 786689, metadata !4, metadata !"s", metadata !5,
> i32 16777219, metadata !9, i32 0, i32 0, i32 3, i32 0, i32 8} ; [
> DW_TAG_arg_variable ] [s] [line 3]
> !21 = metadata !{i32 786689, metadata !4, metadata !"s", metadata !5,
> i32 16777219, metadata !9, i32 0, i32 0, i32 3, i32 8, i32 4} ; [
> DW_TAG_arg_variable ] [s] [line 3]
>
> All the way through ISel and the MC layer those two MDNodes behave like
> regular DIVariables with complex addresses. In DwarfDebug, we need to treat
> the pieces as one entity when calculating the Ranges/History.
> getEntireVariable() simply chops off the last two elements so it can be
> used as a shared index into DbgVariables while still indicating that this
> is a fragmented location. The extra code in the range calculation makes
> sure that a piece of a variable is not clobbered by a non-overlapping piece.
>
> FYI: In a previous design I experimented with introducing a new type
> MDnode
> !Piece = metadata !{i32 PIECE, metadata !<ref to DIVariable>, metadata
> !<Offset>, metadata !<Size>}
> but this meant adding an extra case to all the ISel/MC code handling
> DBG_VALUEs, which is why I ended up with the current design.
>
> -- adrian
>
> http://llvm-reviews.chandlerc.com/D2680
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140204/f22ea015/attachment.html>
More information about the llvm-commits
mailing list