[Lldb-commits] [lldb] RISCV unwinding enable (PR #158161)
Greg Clayton via lldb-commits
lldb-commits at lists.llvm.org
Fri Sep 12 14:27:20 PDT 2025
================
@@ -737,11 +799,44 @@ class Executor {
bool operator()(SH inst) { return Store<SH, uint16_t>(m_emu, inst); }
bool operator()(SW inst) { return Store<SW, uint32_t>(m_emu, inst); }
bool operator()(ADDI inst) {
- return transformOptional(inst.rs1.ReadI64(m_emu),
- [&](int64_t rs1) {
- return inst.rd.Write(
- m_emu, rs1 + int64_t(SignExt(inst.imm)));
- })
+ return transformOptional(
+ inst.rs1.ReadI64(m_emu),
+ [&](int64_t rs1) {
+ int64_t result = rs1 + int64_t(SignExt(inst.imm));
+ // Check if this is a stack pointer adjustment
+ if (inst.rd.rd == RISCV_GPR_SP &&
+ inst.rs1.rs == RISCV_GPR_SP) { // rd=sp, rs1=sp
----------------
clayborg wrote:
We probably don't need this comment now that we are using `RISCV_GPR_SP`?
https://github.com/llvm/llvm-project/pull/158161
More information about the lldb-commits
mailing list