The current version of TargetThreadWindows::CreateRegisterContextForFrame function always returns the register context of the zeroth frame. This patch uses an unwinder to get register contexts of frames other than zeroth.
Details
Diff Detail
Event Timeline
Excuse me, I have forgot to add lldb-commits as a subscriber, so I'll repeat initial message.
The current version of TargetThreadWindows::CreateRegisterContextForFrame function always returns the register context of the zeroth frame. This patch uses an unwinder to get register contexts of frames other than zeroth.
I'm actually in the middle of cleaning up the change attached to this bug: https://bugs.llvm.org/show_bug.cgi?id=37495 which is equivalent functionally but follows the pattern for the other targets. Let me run some tests and I'll submit it for review. It should fix your issue.
source/Plugins/Process/Windows/Common/TargetThreadWindows.cpp | ||
---|---|---|
52 | This bit seems redundant given that CreateRegisterContextForFrameIndex now checks the special case of 0. It's not a big deal, but I could see someone getting confused while debugging things wondering by CreateRegisterContextForFrameIndex is sometimes called for frame 0 and sometimes not. |
Thank you!
Yes, D49111 is more like other targets, so I think it will be a better choice. So I will abandon the current revision.
This bit seems redundant given that CreateRegisterContextForFrameIndex now checks the special case of 0. It's not a big deal, but I could see someone getting confused while debugging things wondering by CreateRegisterContextForFrameIndex is sometimes called for frame 0 and sometimes not.