[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 16:00:30 PST 2021
clayborg added inline comments.
================
Comment at: lldb/source/Target/RegisterContext.cpp:162
+ if (!BehavesLikeZerothFrame())
+ pc--;
+ const bool allow_section_end = true;
----------------
jasonmolenda wrote:
> clayborg wrote:
> > Can we decrement the PC by the minimum instruction size? If we can get an ArchSpec we can call:
> >
> > ```
> > uint32_t ArchSpec::GetMinimumOpcodeByteSize() const;
> > ```
> >
> I don't know if it's worth it. For fixed-width architectures, we'll be symbolicating an instruction boundary, but for others, we're just decrementing within the bounds of the instruction. We should not ever show this address anywhere, it's only used for setting context and we need to be within the bounds of the instruction. pc-1 seems fine to me. I don't feel very strongly about this.
My only reason to vote for doing this is to avoid creating a lookup address that looks like a thumb address on 32 bit ARM if we subtract 1 from it and the code is available above. That being said, I don't feel strongly about this either.
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