Skip to content

[lldb][RISCV] function prologue backtrace fix #99043

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions lldb/source/Plugins/ABI/RISCV/ABISysV_riscv.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

#include "llvm/IR/DerivedTypes.h"

#include "Utility/RISCV_DWARF_Registers.h"
#include "lldb/Core/PluginManager.h"
#include "lldb/Core/Value.h"
#include "lldb/Core/ValueObjectConstResult.h"
Expand Down Expand Up @@ -643,9 +644,9 @@ bool ABISysV_riscv::CreateFunctionEntryUnwindPlan(UnwindPlan &unwind_plan) {
unwind_plan.Clear();
unwind_plan.SetRegisterKind(eRegisterKindDWARF);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since we specify here that we are using DWARF registers, then the change below is correct,


uint32_t pc_reg_num = LLDB_REGNUM_GENERIC_PC;
uint32_t sp_reg_num = LLDB_REGNUM_GENERIC_SP;
uint32_t ra_reg_num = LLDB_REGNUM_GENERIC_RA;
uint32_t pc_reg_num = riscv_dwarf::dwarf_gpr_pc;
uint32_t sp_reg_num = riscv_dwarf::dwarf_gpr_sp;
uint32_t ra_reg_num = riscv_dwarf::dwarf_gpr_ra;

UnwindPlan::RowSP row(new UnwindPlan::Row);

Expand Down
Loading