[Lldb-commits] [PATCH] D97644: Allow RegisterContext to track if behaves-like-frame-0, allow LanguageRuntime for above frame 0
Jason Molenda via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Wed Mar 3 18:45:52 PST 2021
jasonmolenda added inline comments.
================
Comment at: lldb/source/Target/StackFrame.cpp:217-226
+ Address lookup_addr(GetFrameCodeAddress());
+ if (!lookup_addr.IsValid())
+ return lookup_addr;
+ if (m_behaves_like_zeroth_frame)
+ return lookup_addr;
+
+ addr_t offset = lookup_addr.GetOffset();
----------------
jasonmolenda wrote:
> clayborg wrote:
> > Should we be using the "bool RegisterContext::GetPCForSymbolication(Address &address)" function here to avoid having more than one place that is subtracting from the PC value?
> Yeah, I thought about that as I was doing it. I'll unify these.
Ah, I see why they can't be unified. A StackFrame may be set up with a pc value different than the register context for the concrete frame here, e.g. for a tail-call artifical stack frame. It took me a little while to figure out why deferring to the StackFrame's RegisterContext was causing failures in those tests. I added a comment saying why this code needs to decr-pc too, so someone doesn't try to clean these up in the future.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D97644/new/
https://reviews.llvm.org/D97644
More information about the lldb-commits
mailing list