Skip to content

[lldb] Use UnwindPlan::Row as values, part 2 #132008

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
merged 1 commit into from
Mar 20, 2025
Merged
Show file tree
Hide file tree
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
8 changes: 2 additions & 6 deletions lldb/include/lldb/Symbol/UnwindPlan.h
Original file line number Diff line number Diff line change
Expand Up @@ -462,13 +462,9 @@ class UnwindPlan {

void Dump(Stream &s, Thread *thread, lldb::addr_t base_addr) const;

void AppendRow(const RowSP &row_sp);
void AppendRow(Row row) { AppendRow(std::make_shared<Row>(std::move(row))); }
void AppendRow(Row row);

void InsertRow(const RowSP &row_sp, bool replace_existing = false);
void InsertRow(Row row, bool replace_existing = false) {
InsertRow(std::make_shared<Row>(std::move(row)), replace_existing);
}
void InsertRow(Row row, bool replace_existing = false);

// Returns a pointer to the best row for the given offset into the function's
// instructions. If offset is -1 it indicates that the function start is
Expand Down
21 changes: 10 additions & 11 deletions lldb/source/Plugins/ABI/AArch64/ABIMacOSX_arm64.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -349,16 +349,16 @@ UnwindPlanSP ABIMacOSX_arm64::CreateFunctionEntryUnwindPlan() {
uint32_t sp_reg_num = arm64_dwarf::sp;
uint32_t pc_reg_num = arm64_dwarf::pc;

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

// Our previous Call Frame Address is the stack pointer
row->GetCFAValue().SetIsRegisterPlusOffset(sp_reg_num, 0);
row.GetCFAValue().SetIsRegisterPlusOffset(sp_reg_num, 0);

// Our previous PC is in the LR, all other registers are the same.
row->SetRegisterLocationToRegister(pc_reg_num, lr_reg_num, true);
row.SetRegisterLocationToRegister(pc_reg_num, lr_reg_num, true);

auto plan_sp = std::make_shared<UnwindPlan>(eRegisterKindDWARF);
plan_sp->AppendRow(row);
plan_sp->AppendRow(std::move(row));
plan_sp->SetSourceName("arm64 at-func-entry default");
plan_sp->SetSourcedFromCompiler(eLazyBoolNo);
return plan_sp;
Expand All @@ -368,18 +368,17 @@ UnwindPlanSP ABIMacOSX_arm64::CreateDefaultUnwindPlan() {
uint32_t fp_reg_num = arm64_dwarf::fp;
uint32_t pc_reg_num = arm64_dwarf::pc;

UnwindPlan::RowSP row(new UnwindPlan::Row);
UnwindPlan::Row row;
const int32_t ptr_size = 8;

row->GetCFAValue().SetIsRegisterPlusOffset(fp_reg_num, 2 * ptr_size);
row->SetOffset(0);
row->SetUnspecifiedRegistersAreUndefined(true);
row.GetCFAValue().SetIsRegisterPlusOffset(fp_reg_num, 2 * ptr_size);
row.SetUnspecifiedRegistersAreUndefined(true);

row->SetRegisterLocationToAtCFAPlusOffset(fp_reg_num, ptr_size * -2, true);
row->SetRegisterLocationToAtCFAPlusOffset(pc_reg_num, ptr_size * -1, true);
row.SetRegisterLocationToAtCFAPlusOffset(fp_reg_num, ptr_size * -2, true);
row.SetRegisterLocationToAtCFAPlusOffset(pc_reg_num, ptr_size * -1, true);

auto plan_sp = std::make_shared<UnwindPlan>(eRegisterKindDWARF);
plan_sp->AppendRow(row);
plan_sp->AppendRow(std::move(row));
plan_sp->SetSourceName("arm64-apple-darwin default unwind plan");
plan_sp->SetSourcedFromCompiler(eLazyBoolNo);
plan_sp->SetUnwindPlanValidAtAllInstructions(eLazyBoolNo);
Expand Down
19 changes: 9 additions & 10 deletions lldb/source/Plugins/ABI/AArch64/ABISysV_arm64.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -389,14 +389,14 @@ UnwindPlanSP ABISysV_arm64::CreateFunctionEntryUnwindPlan() {
uint32_t lr_reg_num = arm64_dwarf::lr;
uint32_t sp_reg_num = arm64_dwarf::sp;

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

// Our previous Call Frame Address is the stack pointer, all other registers
// are the same.
row->GetCFAValue().SetIsRegisterPlusOffset(sp_reg_num, 0);
row.GetCFAValue().SetIsRegisterPlusOffset(sp_reg_num, 0);

auto plan_sp = std::make_shared<UnwindPlan>(eRegisterKindDWARF);
plan_sp->AppendRow(row);
plan_sp->AppendRow(std::move(row));
plan_sp->SetReturnAddressRegister(lr_reg_num);
plan_sp->SetSourceName("arm64 at-func-entry default");
plan_sp->SetSourcedFromCompiler(eLazyBoolNo);
Expand All @@ -409,18 +409,17 @@ UnwindPlanSP ABISysV_arm64::CreateDefaultUnwindPlan() {
uint32_t fp_reg_num = arm64_dwarf::fp;
uint32_t pc_reg_num = arm64_dwarf::pc;

UnwindPlan::RowSP row(new UnwindPlan::Row);
UnwindPlan::Row row;
const int32_t ptr_size = 8;

row->GetCFAValue().SetIsRegisterPlusOffset(fp_reg_num, 2 * ptr_size);
row->SetOffset(0);
row->SetUnspecifiedRegistersAreUndefined(true);
row.GetCFAValue().SetIsRegisterPlusOffset(fp_reg_num, 2 * ptr_size);
row.SetUnspecifiedRegistersAreUndefined(true);

row->SetRegisterLocationToAtCFAPlusOffset(fp_reg_num, ptr_size * -2, true);
row->SetRegisterLocationToAtCFAPlusOffset(pc_reg_num, ptr_size * -1, true);
row.SetRegisterLocationToAtCFAPlusOffset(fp_reg_num, ptr_size * -2, true);
row.SetRegisterLocationToAtCFAPlusOffset(pc_reg_num, ptr_size * -1, true);

auto plan_sp = std::make_shared<UnwindPlan>(eRegisterKindDWARF);
plan_sp->AppendRow(row);
plan_sp->AppendRow(std::move(row));
plan_sp->SetSourceName("arm64 default unwind plan");
plan_sp->SetSourcedFromCompiler(eLazyBoolNo);
plan_sp->SetUnwindPlanValidAtAllInstructions(eLazyBoolNo);
Expand Down
8 changes: 4 additions & 4 deletions lldb/source/Plugins/ABI/ARC/ABISysV_arc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -560,16 +560,16 @@ ValueObjectSP ABISysV_arc::GetReturnValueObjectImpl(Thread &thread,
}

UnwindPlanSP ABISysV_arc::CreateFunctionEntryUnwindPlan() {
UnwindPlan::RowSP row(new UnwindPlan::Row);
UnwindPlan::Row row;

// Our Call Frame Address is the stack pointer value.
row->GetCFAValue().SetIsRegisterPlusOffset(dwarf::sp, 0);
row.GetCFAValue().SetIsRegisterPlusOffset(dwarf::sp, 0);

// The previous PC is in the BLINK, all other registers are the same.
row->SetRegisterLocationToRegister(dwarf::pc, dwarf::blink, true);
row.SetRegisterLocationToRegister(dwarf::pc, dwarf::blink, true);

auto plan_sp = std::make_shared<UnwindPlan>(eRegisterKindDWARF);
plan_sp->AppendRow(row);
plan_sp->AppendRow(std::move(row));
plan_sp->SetSourceName("arc at-func-entry default");
plan_sp->SetSourcedFromCompiler(eLazyBoolNo);
return plan_sp;
Expand Down
21 changes: 10 additions & 11 deletions lldb/source/Plugins/ABI/ARM/ABIMacOSX_arm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1788,16 +1788,16 @@ UnwindPlanSP ABIMacOSX_arm::CreateFunctionEntryUnwindPlan() {
uint32_t sp_reg_num = dwarf_sp;
uint32_t pc_reg_num = dwarf_pc;

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

// Our Call Frame Address is the stack pointer value
row->GetCFAValue().SetIsRegisterPlusOffset(sp_reg_num, 0);
row.GetCFAValue().SetIsRegisterPlusOffset(sp_reg_num, 0);

// The previous PC is in the LR, all other registers are the same.
row->SetRegisterLocationToRegister(pc_reg_num, lr_reg_num, true);
row.SetRegisterLocationToRegister(pc_reg_num, lr_reg_num, true);

auto plan_sp = std::make_shared<UnwindPlan>(eRegisterKindDWARF);
plan_sp->AppendRow(row);
plan_sp->AppendRow(std::move(row));
plan_sp->SetSourceName("arm at-func-entry default");
plan_sp->SetSourcedFromCompiler(eLazyBoolNo);
return plan_sp;
Expand All @@ -1808,18 +1808,17 @@ UnwindPlanSP ABIMacOSX_arm::CreateDefaultUnwindPlan() {
dwarf_r7; // apple uses r7 for all frames. Normal arm uses r11
uint32_t pc_reg_num = dwarf_pc;

UnwindPlan::RowSP row(new UnwindPlan::Row);
UnwindPlan::Row row;
const int32_t ptr_size = 4;

row->GetCFAValue().SetIsRegisterPlusOffset(fp_reg_num, 2 * ptr_size);
row->SetOffset(0);
row->SetUnspecifiedRegistersAreUndefined(true);
row.GetCFAValue().SetIsRegisterPlusOffset(fp_reg_num, 2 * ptr_size);
row.SetUnspecifiedRegistersAreUndefined(true);

row->SetRegisterLocationToAtCFAPlusOffset(fp_reg_num, ptr_size * -2, true);
row->SetRegisterLocationToAtCFAPlusOffset(pc_reg_num, ptr_size * -1, true);
row.SetRegisterLocationToAtCFAPlusOffset(fp_reg_num, ptr_size * -2, true);
row.SetRegisterLocationToAtCFAPlusOffset(pc_reg_num, ptr_size * -1, true);

auto plan_sp = std::make_shared<UnwindPlan>(eRegisterKindDWARF);
plan_sp->AppendRow(row);
plan_sp->AppendRow(std::move(row));
plan_sp->SetSourceName("arm-apple-ios default unwind plan");
plan_sp->SetSourcedFromCompiler(eLazyBoolNo);
plan_sp->SetUnwindPlanValidAtAllInstructions(eLazyBoolNo);
Expand Down
21 changes: 10 additions & 11 deletions lldb/source/Plugins/ABI/ARM/ABISysV_arm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1905,15 +1905,15 @@ UnwindPlanSP ABISysV_arm::CreateFunctionEntryUnwindPlan() {
uint32_t sp_reg_num = dwarf_sp;
uint32_t pc_reg_num = dwarf_pc;

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

// Our Call Frame Address is the stack pointer value
row->GetCFAValue().SetIsRegisterPlusOffset(sp_reg_num, 0);
row.GetCFAValue().SetIsRegisterPlusOffset(sp_reg_num, 0);

// The previous PC is in the LR, all other registers are the same.
row->SetRegisterLocationToRegister(pc_reg_num, lr_reg_num, true);
row.SetRegisterLocationToRegister(pc_reg_num, lr_reg_num, true);
auto plan_sp = std::make_shared<UnwindPlan>(eRegisterKindDWARF);
plan_sp->AppendRow(row);
plan_sp->AppendRow(std::move(row));
plan_sp->SetSourceName("arm at-func-entry default");
plan_sp->SetSourcedFromCompiler(eLazyBoolNo);
return plan_sp;
Expand All @@ -1924,18 +1924,17 @@ UnwindPlanSP ABISysV_arm::CreateDefaultUnwindPlan() {
uint32_t fp_reg_num = dwarf_r11;
uint32_t pc_reg_num = dwarf_pc;

UnwindPlan::RowSP row(new UnwindPlan::Row);
UnwindPlan::Row row;
const int32_t ptr_size = 4;

row->GetCFAValue().SetIsRegisterPlusOffset(fp_reg_num, 2 * ptr_size);
row->SetOffset(0);
row->SetUnspecifiedRegistersAreUndefined(true);
row.GetCFAValue().SetIsRegisterPlusOffset(fp_reg_num, 2 * ptr_size);
row.SetUnspecifiedRegistersAreUndefined(true);

row->SetRegisterLocationToAtCFAPlusOffset(fp_reg_num, ptr_size * -2, true);
row->SetRegisterLocationToAtCFAPlusOffset(pc_reg_num, ptr_size * -1, true);
row.SetRegisterLocationToAtCFAPlusOffset(fp_reg_num, ptr_size * -2, true);
row.SetRegisterLocationToAtCFAPlusOffset(pc_reg_num, ptr_size * -1, true);

auto plan_sp = std::make_shared<UnwindPlan>(eRegisterKindDWARF);
plan_sp->AppendRow(row);
plan_sp->AppendRow(std::move(row));
plan_sp->SetSourceName("arm default unwind plan");
plan_sp->SetSourcedFromCompiler(eLazyBoolNo);
plan_sp->SetUnwindPlanValidAtAllInstructions(eLazyBoolNo);
Expand Down
25 changes: 12 additions & 13 deletions lldb/source/Plugins/ABI/Hexagon/ABISysV_hexagon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1196,18 +1196,17 @@ ValueObjectSP ABISysV_hexagon::GetReturnValueObjectImpl(
// called when we are on the first instruction of a new function for hexagon
// the return address is in RA (R31)
UnwindPlanSP ABISysV_hexagon::CreateFunctionEntryUnwindPlan() {
UnwindPlan::RowSP row(new UnwindPlan::Row);
UnwindPlan::Row row;

// Our Call Frame Address is the stack pointer value
row->GetCFAValue().SetIsRegisterPlusOffset(LLDB_REGNUM_GENERIC_SP, 4);
row->SetOffset(0);
row.GetCFAValue().SetIsRegisterPlusOffset(LLDB_REGNUM_GENERIC_SP, 4);

// The previous PC is in the LR
row->SetRegisterLocationToRegister(LLDB_REGNUM_GENERIC_PC,
LLDB_REGNUM_GENERIC_RA, true);
row.SetRegisterLocationToRegister(LLDB_REGNUM_GENERIC_PC,
LLDB_REGNUM_GENERIC_RA, true);

auto plan_sp = std::make_shared<UnwindPlan>(eRegisterKindGeneric);
plan_sp->AppendRow(row);
plan_sp->AppendRow(std::move(row));
plan_sp->SetReturnAddressRegister(LLDB_REGNUM_GENERIC_RA);
plan_sp->SetSourceName("hexagon at-func-entry default");
plan_sp->SetSourcedFromCompiler(eLazyBoolNo);
Expand All @@ -1219,17 +1218,17 @@ UnwindPlanSP ABISysV_hexagon::CreateDefaultUnwindPlan() {
uint32_t sp_reg_num = LLDB_REGNUM_GENERIC_SP;
uint32_t pc_reg_num = LLDB_REGNUM_GENERIC_PC;

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

row->SetUnspecifiedRegistersAreUndefined(true);
row->GetCFAValue().SetIsRegisterPlusOffset(LLDB_REGNUM_GENERIC_FP, 8);
row.SetUnspecifiedRegistersAreUndefined(true);
row.GetCFAValue().SetIsRegisterPlusOffset(LLDB_REGNUM_GENERIC_FP, 8);

row->SetRegisterLocationToAtCFAPlusOffset(fp_reg_num, -8, true);
row->SetRegisterLocationToAtCFAPlusOffset(pc_reg_num, -4, true);
row->SetRegisterLocationToIsCFAPlusOffset(sp_reg_num, 0, true);
row.SetRegisterLocationToAtCFAPlusOffset(fp_reg_num, -8, true);
row.SetRegisterLocationToAtCFAPlusOffset(pc_reg_num, -4, true);
row.SetRegisterLocationToIsCFAPlusOffset(sp_reg_num, 0, true);

auto plan_sp = std::make_shared<UnwindPlan>(eRegisterKindGeneric);
plan_sp->AppendRow(row);
plan_sp->AppendRow(std::move(row));
plan_sp->SetSourceName("hexagon default unwind plan");
plan_sp->SetSourcedFromCompiler(eLazyBoolNo);
plan_sp->SetUnwindPlanValidAtAllInstructions(eLazyBoolNo);
Expand Down
19 changes: 9 additions & 10 deletions lldb/source/Plugins/ABI/LoongArch/ABISysV_loongarch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -539,16 +539,16 @@ UnwindPlanSP ABISysV_loongarch::CreateFunctionEntryUnwindPlan() {
uint32_t sp_reg_num = loongarch_dwarf::dwarf_gpr_sp;
uint32_t ra_reg_num = loongarch_dwarf::dwarf_gpr_ra;

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

// Define CFA as the stack pointer
row->GetCFAValue().SetIsRegisterPlusOffset(sp_reg_num, 0);
row.GetCFAValue().SetIsRegisterPlusOffset(sp_reg_num, 0);

// Previous frame's pc is in ra
row->SetRegisterLocationToRegister(pc_reg_num, ra_reg_num, true);
row.SetRegisterLocationToRegister(pc_reg_num, ra_reg_num, true);

auto plan_sp = std::make_shared<UnwindPlan>(eRegisterKindDWARF);
plan_sp->AppendRow(row);
plan_sp->AppendRow(std::move(row));
plan_sp->SetSourceName("loongarch function-entry unwind plan");
plan_sp->SetSourcedFromCompiler(eLazyBoolNo);
return plan_sp;
Expand All @@ -558,23 +558,22 @@ UnwindPlanSP ABISysV_loongarch::CreateDefaultUnwindPlan() {
uint32_t pc_reg_num = LLDB_REGNUM_GENERIC_PC;
uint32_t fp_reg_num = LLDB_REGNUM_GENERIC_FP;

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

// Define the CFA as the current frame pointer value.
row->GetCFAValue().SetIsRegisterPlusOffset(fp_reg_num, 0);
row->SetOffset(0);
row.GetCFAValue().SetIsRegisterPlusOffset(fp_reg_num, 0);

int reg_size = 4;
if (m_is_la64)
reg_size = 8;

// Assume the ra reg (return pc) and caller's frame pointer
// have been spilled to stack already.
row->SetRegisterLocationToAtCFAPlusOffset(fp_reg_num, reg_size * -2, true);
row->SetRegisterLocationToAtCFAPlusOffset(pc_reg_num, reg_size * -1, true);
row.SetRegisterLocationToAtCFAPlusOffset(fp_reg_num, reg_size * -2, true);
row.SetRegisterLocationToAtCFAPlusOffset(pc_reg_num, reg_size * -1, true);

auto plan_sp = std::make_shared<UnwindPlan>(eRegisterKindGeneric);
plan_sp->AppendRow(row);
plan_sp->AppendRow(std::move(row));
plan_sp->SetSourceName("loongarch default unwind plan");
plan_sp->SetSourcedFromCompiler(eLazyBoolNo);
plan_sp->SetUnwindPlanValidAtAllInstructions(eLazyBoolNo);
Expand Down
22 changes: 11 additions & 11 deletions lldb/source/Plugins/ABI/MSP430/ABISysV_msp430.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -309,13 +309,13 @@ UnwindPlanSP ABISysV_msp430::CreateFunctionEntryUnwindPlan() {
uint32_t sp_reg_num = dwarf_sp;
uint32_t pc_reg_num = dwarf_pc;

UnwindPlan::RowSP row(new UnwindPlan::Row);
row->GetCFAValue().SetIsRegisterPlusOffset(sp_reg_num, 2);
row->SetRegisterLocationToAtCFAPlusOffset(pc_reg_num, -2, true);
row->SetRegisterLocationToIsCFAPlusOffset(sp_reg_num, 0, true);
UnwindPlan::Row row;
row.GetCFAValue().SetIsRegisterPlusOffset(sp_reg_num, 2);
row.SetRegisterLocationToAtCFAPlusOffset(pc_reg_num, -2, true);
row.SetRegisterLocationToIsCFAPlusOffset(sp_reg_num, 0, true);

auto plan_sp = std::make_shared<UnwindPlan>(eRegisterKindDWARF);
plan_sp->AppendRow(row);
plan_sp->AppendRow(std::move(row));
plan_sp->SetSourceName("msp430 at-func-entry default");
plan_sp->SetSourcedFromCompiler(eLazyBoolNo);
return plan_sp;
Expand All @@ -326,14 +326,14 @@ UnwindPlanSP ABISysV_msp430::CreateDefaultUnwindPlan() {
uint32_t sp_reg_num = dwarf_sp;
uint32_t pc_reg_num = dwarf_pc;

UnwindPlan::RowSP row(new UnwindPlan::Row);
row->GetCFAValue().SetIsRegisterPlusOffset(sp_reg_num, 2);
row->SetRegisterLocationToAtCFAPlusOffset(pc_reg_num, -2, true);
row->SetRegisterLocationToIsCFAPlusOffset(sp_reg_num, 0, true);
row->SetRegisterLocationToUnspecified(fp_reg_num, true);
UnwindPlan::Row row;
row.GetCFAValue().SetIsRegisterPlusOffset(sp_reg_num, 2);
row.SetRegisterLocationToAtCFAPlusOffset(pc_reg_num, -2, true);
row.SetRegisterLocationToIsCFAPlusOffset(sp_reg_num, 0, true);
row.SetRegisterLocationToUnspecified(fp_reg_num, true);

auto plan_sp = std::make_shared<UnwindPlan>(eRegisterKindDWARF);
plan_sp->AppendRow(row);
plan_sp->AppendRow(std::move(row));
plan_sp->SetSourceName("msp430 default unwind plan");
plan_sp->SetSourcedFromCompiler(eLazyBoolNo);
plan_sp->SetUnwindPlanValidAtAllInstructions(eLazyBoolNo);
Expand Down
18 changes: 9 additions & 9 deletions lldb/source/Plugins/ABI/Mips/ABISysV_mips.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -956,32 +956,32 @@ ValueObjectSP ABISysV_mips::GetReturnValueObjectImpl(
}

UnwindPlanSP ABISysV_mips::CreateFunctionEntryUnwindPlan() {
UnwindPlan::RowSP row(new UnwindPlan::Row);
UnwindPlan::Row row;

// Our Call Frame Address is the stack pointer value
row->GetCFAValue().SetIsRegisterPlusOffset(dwarf_r29, 0);
row.GetCFAValue().SetIsRegisterPlusOffset(dwarf_r29, 0);

// The previous PC is in the RA, all other registers are the same.
row->SetRegisterLocationToRegister(dwarf_pc, dwarf_r31, true);
row.SetRegisterLocationToRegister(dwarf_pc, dwarf_r31, true);

auto plan_sp = std::make_shared<UnwindPlan>(eRegisterKindDWARF);
plan_sp->AppendRow(row);
plan_sp->AppendRow(std::move(row));
plan_sp->SetSourceName("mips at-func-entry default");
plan_sp->SetSourcedFromCompiler(eLazyBoolNo);
plan_sp->SetReturnAddressRegister(dwarf_r31);
return plan_sp;
}

UnwindPlanSP ABISysV_mips::CreateDefaultUnwindPlan() {
UnwindPlan::RowSP row(new UnwindPlan::Row);
UnwindPlan::Row row;

row->SetUnspecifiedRegistersAreUndefined(true);
row->GetCFAValue().SetIsRegisterPlusOffset(dwarf_r29, 0);
row.SetUnspecifiedRegistersAreUndefined(true);
row.GetCFAValue().SetIsRegisterPlusOffset(dwarf_r29, 0);

row->SetRegisterLocationToRegister(dwarf_pc, dwarf_r31, true);
row.SetRegisterLocationToRegister(dwarf_pc, dwarf_r31, true);

auto plan_sp = std::make_shared<UnwindPlan>(eRegisterKindDWARF);
plan_sp->AppendRow(row);
plan_sp->AppendRow(std::move(row));
plan_sp->SetSourceName("mips default unwind plan");
plan_sp->SetSourcedFromCompiler(eLazyBoolNo);
plan_sp->SetUnwindPlanValidAtAllInstructions(eLazyBoolNo);
Expand Down
Loading