[PATCH] Debug info: Support fragmented variables.

Adrian Prantl aprantl at apple.com
Wed Feb 26 09:58:46 PST 2014


On Feb 25, 2014, at 19:11, Eric Christopher <echristo at gmail.com> wrote:

Thanks for looking at this!
> 
>  I think the first question is how this is going to interact with DIBuilder::createComplexVariable? I think it should just be a concatenation of the two things. It looks like you have it as an instead? In general, I think I like the idea that variable locations just have expressions attached to them. And lacking anything else I think dwarf expressions are just fine here.
> 
>  I've got more comments on the patch itself, but let's get this out of the way first.

If I understand your question correctly, you’re asking why I chose to provide a new createVariablePiece() API only to create a specific case of a ComplexVariable?
a) I think it’s more user-friendly — otherwise people will have to manually create a DIArray and push Size and Offset every time.
b) It’s a tiny bit more self-documenting (otherwise people will have to remember whether size or offset comes first, are the units bits or bytes, etc.). It’s not type-safe, though.

Would it help to document/implement it as being a wrapper for createComplexVariable?

-- adrian



More information about the llvm-commits mailing list