DWARF Standard


HOME
SPECIFICATIONS
FAQ
ISSUES



181205.1 Greg Clayton Clarify DW_OP_piece documentation for parts of values that are optimized out Clarification Open


Section 2.6.1.2, pg 42
After someone posted a bug on bugzilla for LLDB regarding LLDB not showing 
that parts of a value were optimized out (https://bugs.llvm.org/show_bug.cgi?id=39869), 
I read the documentation on DW_OP_piece for clarification on what should be done 
when part of a value is optimized out. As the comments in the bug show, there is a 
mention in the DWARF specification in "2.6.1.1.1 Empty Location Descriptions" that 
says something about an empty location means the value might be optimized out. 

People reading the spec must currently read this and be able to infer that a 
location like:
DW_OP_piece: 6; ...
Means that the value starts with 6 optimized out bytes. Also, these optimized out 
bytes could be in the middle of a DWARF expression. It might be nice to clarify 
usage of DW_OP_piece to specify that parts of the value are optimized out.

I currently assume that if you run into a DW_OP_piece and the expression stack is 
empty, then the bytes for the piece are optimized out. What would happen if there 
was something on the stack and you needed to specify that 4 bytes of a value were 
optimized out? 




All logos and trademarks in this site are property of their respective owner.
The comments are property of their posters, all the rest © 2007-2017 by DWARF Standards Committee.