[Lldb-commits] [PATCH] D97644: Allow RegisterContext to track if behaves-like-frame-0, allow LanguageRuntime for above frame 0
Greg Clayton via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Wed Mar 3 15:01:19 PST 2021
clayborg requested changes to this revision.
clayborg added inline comments.
This revision now requires changes to proceed.
================
Comment at: lldb/source/Target/RegisterContext.cpp:162
+ if (!BehavesLikeZerothFrame())
+ pc--;
+ const bool allow_section_end = true;
----------------
Can we decrement the PC by the minimum instruction size? If we can get an ArchSpec we can call:
```
uint32_t ArchSpec::GetMinimumOpcodeByteSize() const;
```
================
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();
----------------
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?
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