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

_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to