This is an archive of the discontinued LLVM Phabricator instance.

[Coroutines] Add DW_OP_deref for transformed dbg.value intrinsic.
ClosedPublic

Authored by junparser on Dec 1 2020, 10:56 PM.

Details

Summary

This patch adds DW_OP_deref for dbg.value intrinsic as @jmorse's suggestion in D90772 which allows debugger prints the value of variable instead of address.

Test Plan: check-llvm cppcoro

Diff Detail

Event Timeline

junparser created this revision.Dec 1 2020, 10:56 PM
junparser requested review of this revision.Dec 1 2020, 10:56 PM
junparser edited the summary of this revision. (Show Details)
bruno added a comment.Dec 2 2020, 9:28 AM

Thanks for following up with this, I did miss to incorporate this suggestion! Out of curiosity, are you using lldb or gdb to print the variable? In lldb I already get values instead of address before this patch, so I wonder if one debugger needs more specific info than the other.

Thanks for following up with this, I did miss to incorporate this suggestion! Out of curiosity, are you using lldb or gdb to print the variable? In lldb I already get values instead of address before this patch, so I wonder if one debugger needs more specific info than the other.

Hmm... I'm using trunk lldb and gdb8.2, both of them can only print address. Btw, os is centos7.2, FYI.

bruno accepted this revision.Dec 2 2020, 7:03 PM

Hmm... I'm using trunk lldb and gdb8.2, both of them can only print address. Btw, os is centos7.2, FYI.

Interesting, I'm using an older version shipped with xcode+macOS, that might explain it. ToT is the way to go anyways, LGTM.

This revision is now accepted and ready to land.Dec 2 2020, 7:03 PM
This revision was landed with ongoing or failed builds.Dec 6 2020, 6:25 PM
This revision was automatically updated to reflect the committed changes.