<div>+llvmdev</div><div>-llvm-commits</div><div><br></div><div>Hi!</div><div><br></div><div><div>I've got the following questions about DBG_VALUE instruction:</div><div>1) When I dump this instruction I see the line of the form:</div>
<div>  DBG_VALUE %EDI, 0, !"a"; line no:47</div><div>for two completely different cases: </div><div>  * when value of "a" is actually stored in a register %edi  (this should be encoded as "DW_OP_reg5" in DWARF).</div>
<div>  * when value of "a" is stored in memory at address stored in %edi ("DW_OP_breg5, 0" in DWARF).</div><div><br></div><div>Currently LLVM handles this in favor of first case, and produces wrong debug info for the second case. Can these cases</div>
<div>actually be distinguished, and if yes, where should I take a look?</div><div><br></div><div>2) This one is more general. I'm trying to make "clang -g" work well with AddressSanitizer instrumentation enabled</div>
<div>(currently generated debug info for variables is pretty much inconsistent) and need to develop a workflow somehow.</div><div>ASan works with llvm IR, so there are no machine instructions, just llvm.dbg.declare / llvm.dbg.value  intrinsics, which</div>
<div>are ignored by ASan. How can IR transforms (inserting function calls, basic blocks, etc.) hurt turning llvm.dbg intrinsic into</div><div>a set of DBG_VALUE instructions? What is the best way I can actually see what's going on when we generate machine instructions from IR?</div>
<div><br></div><div>TIA</div><span class="HOEnZb"><font color="#888888"><div><br></div><div>-- </div></font></span><div><div>Alexey Samsonov, MSK</div><br>
</div></div>