Page MenuHomePhabricator

[DebugInfo] Support for DW_OP_LLVM_explicit_pointer (temp2reg).
Needs ReviewPublic

Authored by alok on Nov 28 2019, 11:25 AM.

Details

Summary
Summary:

This enables debugger to display de-referenced value of pointer in case temporary is optimized out. It happens in case of reference. This patch need to include some compile time option to enable/disable.

Testing:

-Added unit test for validation thru llvm-dwarfdump
-check-llvm (LLDB need to be modifed to support this)
-check-debuginfo (the debug info integration tests)

Diff Detail

Event Timeline

alok created this revision.Nov 28 2019, 11:25 AM
alok updated this revision to Diff 232038.Dec 3 2019, 11:32 PM
alok retitled this revision from [DebugInfo] Support for DW_OP_explicit_pointer (temp2reg). to [DebugInfo] Support for DW_OP_LLVM_explicit_pointer (temp2reg)..

Updated to rename proposed LLVM Dwarf extension to DW_OP_LLVM_explicit_pointer.

dblaikie added inline comments.Dec 4 2019, 11:21 AM
llvm/docs/LangRef.rst
4827–4828

I think this probably still needs some design discussion on the llvm-dev design thread (I know I'm mostly slacking there) - specifically the "can only appear at the beginning" seems like it misses the case I brought up on the thread about multiple levels of indirection.