Skip to content

Commit 02d93f7

Browse files
barsolo2000Bar Soloveychik
andauthored
[RISCV] Adding vlenb register as callee register (#165796)
In recent debug sessions we noticed that GDB debugger is showing more stack trace than lldb. After enabling unwinding log, it seems like the issue is that the CFA is dependent on the value of vlenb. vlenb doesn't change in runtime so we can assume its value from frame 0. Co-authored-by: Bar Soloveychik <[email protected]>
1 parent f7fff18 commit 02d93f7

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lldb/source/Plugins/ABI/RISCV/ABISysV_riscv.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -798,6 +798,8 @@ bool ABISysV_riscv::RegisterIsCalleeSaved(const RegisterInfo *reg_info) {
798798
.Cases({"f8", "f9", "f18", "f19", "f20", "f21", "f22", "f23"},
799799
is_hw_fp)
800800
.Cases({"f24", "f25", "f26", "f27"}, is_hw_fp)
801+
// vlenb is constant and needed for vector unwinding.
802+
.Case("vlenb", true)
801803
.Default(false);
802804

803805
return is_callee_saved;

0 commit comments

Comments
 (0)