jasonmolenda added inline comments.
================ Comment at: lldb/source/Target/RegisterContext.cpp:162 + if (!BehavesLikeZerothFrame()) + pc--; + const bool allow_section_end = true; ---------------- 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. ================ 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(); ---------------- 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. 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
