[llvm-dev] Concatenating DWARF location expressions

Markus Lavin via llvm-dev
Mon, 28 Jan 2019 14:52:47 -0000

> Do you think it makes sense to distinguish between memory and register
> addresses at the IR metadata level already?

I think it would make sense to be a bit stricter with types in debug expressions
in general and if there is, as an example, an expression that derefs something
then clearly keep track of the type of the address and the type of the value
behind that address. I am sure that most of the time it is not really necessary
and the type can be picked up by looking at the intrinsic it is bound to etc but
I can also imagine that there are cases where this would not be sufficient.

> What kind of properties would you like to verify?

E.g. that one doesn't concatenate expressions with incompatible types or
that one does not insert a DW_OP_deref(_size) of wrong size.

My exposure to the debug framework is quite limited so I don’t really know for
sure, it is mostly opinions based on my gut feeling 😊

-Markus