[Lldb-commits] [lldb] [lldb][NFC] New names for the two RegisterLocation classes (PR #109611)
via lldb-commits
lldb-commits at lists.llvm.org
Sun Sep 22 22:47:46 PDT 2024
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-lldb
Author: Jason Molenda (jasonmolenda)
<details>
<summary>Changes</summary>
lldb has two RegisterLocation classes that do slightly different things.
UnwindPlan::Row::RegisterLocation (new: AbstractRegisterLocation) has a description of how to find a register's value or location, not specific to a particular stopping point. It may say that at a given offset into a function, the caller's register has been spilled to stack memory at CFA minus an offset. Or it may say that the caller's register is at a DWARF exprssion.
UnwindLLDB::RegisterLocation (new: ConcreteRegisterLocation) is a specific address where the register is currently stored, or the register it has been copied into, or its value at this point in the current function execution.
When lldb stops in a function, it interprets the
AbstractRegisterLocation's instructions using the register context and stack memory, to create the ConcreteRegisterLocation at this point in time for this stack frame.
I'm not thrilled with AbstractRegisterLocation and ConcreteRegisterLocation, but it's better than the same name and it will be easier to update them if someone suggests a better pair.
---
Patch is 63.82 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/109611.diff
19 Files Affected:
- (modified) lldb/include/lldb/Symbol/UnwindPlan.h (+7-7)
- (modified) lldb/include/lldb/Target/ABI.h (+3-3)
- (modified) lldb/include/lldb/Target/RegisterContextUnwind.h (+12-13)
- (modified) lldb/include/lldb/Target/UnwindLLDB.h (+6-2)
- (modified) lldb/source/Plugins/ABI/SystemZ/ABISysV_s390x.cpp (+1-1)
- (modified) lldb/source/Plugins/ABI/SystemZ/ABISysV_s390x.h (+2-1)
- (modified) lldb/source/Plugins/SymbolFile/Breakpad/SymbolFileBreakpad.cpp (+2-2)
- (modified) lldb/source/Plugins/UnwindAssembly/x86/UnwindAssembly-x86.cpp (+2-2)
- (modified) lldb/source/Plugins/UnwindAssembly/x86/x86AssemblyInspectionEngine.cpp (+4-4)
- (modified) lldb/source/Symbol/ArmUnwindInfo.cpp (+1-1)
- (modified) lldb/source/Symbol/DWARFCallFrameInfo.cpp (+8-8)
- (modified) lldb/source/Symbol/FuncUnwinders.cpp (+2-2)
- (modified) lldb/source/Symbol/UnwindPlan.cpp (+16-18)
- (modified) lldb/source/Target/ABI.cpp (+1-1)
- (modified) lldb/source/Target/RegisterContextUnwind.cpp (+45-41)
- (modified) lldb/source/Target/UnwindLLDB.cpp (+6-4)
- (modified) lldb/unittests/UnwindAssembly/ARM64/TestArm64InstEmulation.cpp (+7-7)
- (modified) lldb/unittests/UnwindAssembly/PPC64/TestPPC64InstEmulation.cpp (+2-2)
- (modified) lldb/unittests/UnwindAssembly/x86/Testx86AssemblyInspectionEngine.cpp (+51-51)
``````````diff
diff --git a/lldb/include/lldb/Symbol/UnwindPlan.h b/lldb/include/lldb/Symbol/UnwindPlan.h
index a9e8406608ff31..a1d00f2d2c0cd1 100644
--- a/lldb/include/lldb/Symbol/UnwindPlan.h
+++ b/lldb/include/lldb/Symbol/UnwindPlan.h
@@ -54,7 +54,7 @@ class UnwindPlan {
public:
class Row {
public:
- class RegisterLocation {
+ class AbstractRegisterLocation {
public:
enum RestoreType {
unspecified, // not specified, we may be able to assume this
@@ -72,11 +72,11 @@ class UnwindPlan {
isConstant // reg = constant
};
- RegisterLocation() : m_location() {}
+ AbstractRegisterLocation() : m_location() {}
- bool operator==(const RegisterLocation &rhs) const;
+ bool operator==(const AbstractRegisterLocation &rhs) const;
- bool operator!=(const RegisterLocation &rhs) const {
+ bool operator!=(const AbstractRegisterLocation &rhs) const {
return !(*this == rhs);
}
@@ -337,10 +337,10 @@ class UnwindPlan {
bool operator==(const Row &rhs) const;
bool GetRegisterInfo(uint32_t reg_num,
- RegisterLocation ®ister_location) const;
+ AbstractRegisterLocation ®ister_location) const;
void SetRegisterInfo(uint32_t reg_num,
- const RegisterLocation register_location);
+ const AbstractRegisterLocation register_location);
void RemoveRegisterInfo(uint32_t reg_num);
@@ -398,7 +398,7 @@ class UnwindPlan {
lldb::addr_t base_addr) const;
protected:
- typedef std::map<uint32_t, RegisterLocation> collection;
+ typedef std::map<uint32_t, AbstractRegisterLocation> collection;
lldb::addr_t m_offset = 0; // Offset into the function for this row
FAValue m_cfa_value;
diff --git a/lldb/include/lldb/Target/ABI.h b/lldb/include/lldb/Target/ABI.h
index 7b646d743346b7..dd941d1c905c15 100644
--- a/lldb/include/lldb/Target/ABI.h
+++ b/lldb/include/lldb/Target/ABI.h
@@ -102,9 +102,9 @@ class ABI : public PluginInterface {
virtual bool RegisterIsVolatile(const RegisterInfo *reg_info) = 0;
- virtual bool
- GetFallbackRegisterLocation(const RegisterInfo *reg_info,
- UnwindPlan::Row::RegisterLocation &unwind_regloc);
+ virtual bool GetFallbackRegisterLocation(
+ const RegisterInfo *reg_info,
+ UnwindPlan::Row::AbstractRegisterLocation &unwind_regloc);
// Should take a look at a call frame address (CFA) which is just the stack
// pointer value upon entry to a function. ABIs usually impose alignment
diff --git a/lldb/include/lldb/Target/RegisterContextUnwind.h b/lldb/include/lldb/Target/RegisterContextUnwind.h
index ef8ae884038663..3be9eb5c5c70fc 100644
--- a/lldb/include/lldb/Target/RegisterContextUnwind.h
+++ b/lldb/include/lldb/Target/RegisterContextUnwind.h
@@ -84,7 +84,7 @@ class RegisterContextUnwind : public lldb_private::RegisterContext {
// past the top (end) of the stack
};
- // UnwindLLDB needs to pass around references to RegisterLocations
+ // UnwindLLDB needs to pass around references to ConcreteRegisterLocations
friend class UnwindLLDB;
// Returns true if we have an unwind loop -- the same stack frame unwinding
@@ -135,29 +135,28 @@ class RegisterContextUnwind : public lldb_private::RegisterContext {
// preserved a register that this
// function didn't modify/use.
//
- // The RegisterLocation type may be set to eRegisterNotAvailable -- this will
- // happen for a volatile register
- // being queried mid-stack. Instead of floating frame 0's contents of that
- // register up the stack (which may
- // or may not be the value of that reg when the function was executing), we
- // won't return any value.
+ // The ConcreteRegisterLocation type may be set to eRegisterNotAvailable --
+ // this will happen for a volatile register being queried mid-stack. Instead
+ // of floating frame 0's contents of that register up the stack (which may or
+ // may not be the value of that reg when the function was executing), we won't
+ // return any value.
//
// If a non-volatile register (a "preserved" register) is requested mid-stack
// and no frames "below" the requested
// stack have saved the register anywhere, it is safe to assume that frame 0's
// register values are still the same
// as the requesting frame's.
- lldb_private::UnwindLLDB::RegisterSearchResult
- SavedLocationForRegister(uint32_t lldb_regnum,
- lldb_private::UnwindLLDB::RegisterLocation ®loc);
+ lldb_private::UnwindLLDB::RegisterSearchResult SavedLocationForRegister(
+ uint32_t lldb_regnum,
+ lldb_private::UnwindLLDB::ConcreteRegisterLocation ®loc);
bool ReadRegisterValueFromRegisterLocation(
- lldb_private::UnwindLLDB::RegisterLocation regloc,
+ lldb_private::UnwindLLDB::ConcreteRegisterLocation regloc,
const lldb_private::RegisterInfo *reg_info,
lldb_private::RegisterValue &value);
bool WriteRegisterValueToRegisterLocation(
- lldb_private::UnwindLLDB::RegisterLocation regloc,
+ lldb_private::UnwindLLDB::ConcreteRegisterLocation regloc,
const lldb_private::RegisterInfo *reg_info,
const lldb_private::RegisterValue &value);
@@ -249,7 +248,7 @@ class RegisterContextUnwind : public lldb_private::RegisterContext {
uint32_t m_frame_number; // What stack frame this RegisterContext is
- std::map<uint32_t, lldb_private::UnwindLLDB::RegisterLocation>
+ std::map<uint32_t, lldb_private::UnwindLLDB::ConcreteRegisterLocation>
m_registers; // where to find reg values for this frame
lldb_private::UnwindLLDB &m_parent_unwind; // The UnwindLLDB that is creating
diff --git a/lldb/include/lldb/Target/UnwindLLDB.h b/lldb/include/lldb/Target/UnwindLLDB.h
index f80212cde3cab0..f2f65e67a76406 100644
--- a/lldb/include/lldb/Target/UnwindLLDB.h
+++ b/lldb/include/lldb/Target/UnwindLLDB.h
@@ -38,7 +38,10 @@ class UnwindLLDB : public lldb_private::Unwind {
protected:
friend class lldb_private::RegisterContextUnwind;
- struct RegisterLocation {
+ /// An UnwindPlan::Row::AbstractRegisterLocation, combined with the register
+ /// context and memory for a specific stop point, is used to create a
+ /// ConcreteRegisterLocation.
+ struct ConcreteRegisterLocation {
enum RegisterLocationTypes {
eRegisterNotSaved = 0, // register was not preserved by callee. If
// volatile reg, is unavailable
@@ -90,7 +93,8 @@ class UnwindLLDB : public lldb_private::Unwind {
// Iterate over the RegisterContextUnwind's in our m_frames vector, look for
// the first one that has a saved location for this reg.
bool SearchForSavedLocationForRegister(
- uint32_t lldb_regnum, lldb_private::UnwindLLDB::RegisterLocation ®loc,
+ uint32_t lldb_regnum,
+ lldb_private::UnwindLLDB::ConcreteRegisterLocation ®loc,
uint32_t starting_frame_num, bool pc_register);
/// Provide the list of user-specified trap handler functions
diff --git a/lldb/source/Plugins/ABI/SystemZ/ABISysV_s390x.cpp b/lldb/source/Plugins/ABI/SystemZ/ABISysV_s390x.cpp
index cbfca1ef6a76b0..ac2d1988a176cc 100644
--- a/lldb/source/Plugins/ABI/SystemZ/ABISysV_s390x.cpp
+++ b/lldb/source/Plugins/ABI/SystemZ/ABISysV_s390x.cpp
@@ -644,7 +644,7 @@ bool ABISysV_s390x::CreateDefaultUnwindPlan(UnwindPlan &unwind_plan) {
bool ABISysV_s390x::GetFallbackRegisterLocation(
const RegisterInfo *reg_info,
- UnwindPlan::Row::RegisterLocation &unwind_regloc) {
+ UnwindPlan::Row::AbstractRegisterLocation &unwind_regloc) {
// If a volatile register is being requested, we don't want to forward the
// next frame's register contents up the stack -- the register is not
// retrievable at this frame.
diff --git a/lldb/source/Plugins/ABI/SystemZ/ABISysV_s390x.h b/lldb/source/Plugins/ABI/SystemZ/ABISysV_s390x.h
index f6c248dc59baaa..ecf3e3906dd7b9 100644
--- a/lldb/source/Plugins/ABI/SystemZ/ABISysV_s390x.h
+++ b/lldb/source/Plugins/ABI/SystemZ/ABISysV_s390x.h
@@ -43,7 +43,8 @@ class ABISysV_s390x : public lldb_private::RegInfoBasedABI {
bool GetFallbackRegisterLocation(
const lldb_private::RegisterInfo *reg_info,
- lldb_private::UnwindPlan::Row::RegisterLocation &unwind_regloc) override;
+ lldb_private::UnwindPlan::Row::AbstractRegisterLocation &unwind_regloc)
+ override;
bool CallFrameAddressIsValid(lldb::addr_t cfa) override {
// Make sure the stack call frame addresses are 8 byte aligned
diff --git a/lldb/source/Plugins/SymbolFile/Breakpad/SymbolFileBreakpad.cpp b/lldb/source/Plugins/SymbolFile/Breakpad/SymbolFileBreakpad.cpp
index 3977dc3a6d67c5..9e78ba8174e3d5 100644
--- a/lldb/source/Plugins/SymbolFile/Breakpad/SymbolFileBreakpad.cpp
+++ b/lldb/source/Plugins/SymbolFile/Breakpad/SymbolFileBreakpad.cpp
@@ -614,7 +614,7 @@ bool SymbolFileBreakpad::ParseCFIUnwindRow(llvm::StringRef unwind_rules,
row.GetCFAValue().SetIsDWARFExpression(saved.data(), saved.size());
} else if (const RegisterInfo *info =
ResolveRegisterOrRA(triple, resolver, lhs)) {
- UnwindPlan::Row::RegisterLocation loc;
+ UnwindPlan::Row::AbstractRegisterLocation loc;
loc.SetIsDWARFExpression(saved.data(), saved.size());
row.SetRegisterInfo(info->kinds[eRegisterKindLLDB], loc);
} else
@@ -766,7 +766,7 @@ SymbolFileBreakpad::ParseWinUnwindPlan(const Bookmark &bookmark,
}
llvm::ArrayRef<uint8_t> saved = SaveAsDWARF(*it->second);
- UnwindPlan::Row::RegisterLocation loc;
+ UnwindPlan::Row::AbstractRegisterLocation loc;
loc.SetIsDWARFExpression(saved.data(), saved.size());
row_sp->SetRegisterInfo(info->kinds[eRegisterKindLLDB], loc);
}
diff --git a/lldb/source/Plugins/UnwindAssembly/x86/UnwindAssembly-x86.cpp b/lldb/source/Plugins/UnwindAssembly/x86/UnwindAssembly-x86.cpp
index eca78a9b3a04b4..5c846bafc24df7 100644
--- a/lldb/source/Plugins/UnwindAssembly/x86/UnwindAssembly-x86.cpp
+++ b/lldb/source/Plugins/UnwindAssembly/x86/UnwindAssembly-x86.cpp
@@ -97,7 +97,7 @@ bool UnwindAssembly_x86::AugmentUnwindPlanFromCallSite(
first_row->GetCFAValue().GetOffset() != wordsize) {
return false;
}
- UnwindPlan::Row::RegisterLocation first_row_pc_loc;
+ UnwindPlan::Row::AbstractRegisterLocation first_row_pc_loc;
if (!first_row->GetRegisterInfo(
pc_regnum.GetAsKind(unwind_plan.GetRegisterKind()),
first_row_pc_loc) ||
@@ -126,7 +126,7 @@ bool UnwindAssembly_x86::AugmentUnwindPlanFromCallSite(
// Get the register locations for eip/rip from the first & last rows. Are
// they both CFA plus an offset? Is it the same offset?
- UnwindPlan::Row::RegisterLocation last_row_pc_loc;
+ UnwindPlan::Row::AbstractRegisterLocation last_row_pc_loc;
if (last_row->GetRegisterInfo(
pc_regnum.GetAsKind(unwind_plan.GetRegisterKind()),
last_row_pc_loc)) {
diff --git a/lldb/source/Plugins/UnwindAssembly/x86/x86AssemblyInspectionEngine.cpp b/lldb/source/Plugins/UnwindAssembly/x86/x86AssemblyInspectionEngine.cpp
index 6bfaa54135a959..81b7f138fe7caa 100644
--- a/lldb/source/Plugins/UnwindAssembly/x86/x86AssemblyInspectionEngine.cpp
+++ b/lldb/source/Plugins/UnwindAssembly/x86/x86AssemblyInspectionEngine.cpp
@@ -915,7 +915,7 @@ bool x86AssemblyInspectionEngine::GetNonCallSiteUnwindPlanFromAssembly(
addr_t current_func_text_offset = 0;
int current_sp_bytes_offset_from_fa = 0;
bool is_aligned = false;
- UnwindPlan::Row::RegisterLocation initial_regloc;
+ UnwindPlan::Row::AbstractRegisterLocation initial_regloc;
UnwindPlan::RowSP row(new UnwindPlan::Row);
unwind_plan.SetPlanValidAddressRange(func_range);
@@ -1051,7 +1051,7 @@ bool x86AssemblyInspectionEngine::GetNonCallSiteUnwindPlanFromAssembly(
if (nonvolatile_reg_p(machine_regno) &&
machine_regno_to_lldb_regno(machine_regno, lldb_regno) &&
!saved_registers[machine_regno]) {
- UnwindPlan::Row::RegisterLocation regloc;
+ UnwindPlan::Row::AbstractRegisterLocation regloc;
if (is_aligned)
regloc.SetAtAFAPlusOffset(-current_sp_bytes_offset_from_fa);
else
@@ -1142,7 +1142,7 @@ bool x86AssemblyInspectionEngine::GetNonCallSiteUnwindPlanFromAssembly(
!saved_registers[machine_regno]) {
saved_registers[machine_regno] = true;
- UnwindPlan::Row::RegisterLocation regloc;
+ UnwindPlan::Row::AbstractRegisterLocation regloc;
// stack_offset for 'movq %r15, -80(%rbp)' will be 80. In the Row, we
// want to express this as the offset from the FA. If the frame base is
@@ -1234,7 +1234,7 @@ bool x86AssemblyInspectionEngine::GetNonCallSiteUnwindPlanFromAssembly(
// determine the effcts of. Verify that the stack frame state
// has been unwound to the same as it was at function entry to avoid
// mis-identifying a JMP instruction as an epilogue.
- UnwindPlan::Row::RegisterLocation sp, pc;
+ UnwindPlan::Row::AbstractRegisterLocation sp, pc;
if (row->GetRegisterInfo(m_lldb_sp_regnum, sp) &&
row->GetRegisterInfo(m_lldb_ip_regnum, pc)) {
// Any ret instruction variant is definitely indicative of an
diff --git a/lldb/source/Symbol/ArmUnwindInfo.cpp b/lldb/source/Symbol/ArmUnwindInfo.cpp
index 6bc3bd6cc5edfa..569e0f591cbafe 100644
--- a/lldb/source/Symbol/ArmUnwindInfo.cpp
+++ b/lldb/source/Symbol/ArmUnwindInfo.cpp
@@ -333,7 +333,7 @@ bool ArmUnwindInfo::GetUnwindPlan(Target &target, const Address &addr,
}
if (!have_location_for_pc) {
- UnwindPlan::Row::RegisterLocation lr_location;
+ UnwindPlan::Row::AbstractRegisterLocation lr_location;
if (row->GetRegisterInfo(dwarf_lr, lr_location))
row->SetRegisterInfo(dwarf_pc, lr_location);
else
diff --git a/lldb/source/Symbol/DWARFCallFrameInfo.cpp b/lldb/source/Symbol/DWARFCallFrameInfo.cpp
index ff2610c9df2765..a743de596b8d8d 100644
--- a/lldb/source/Symbol/DWARFCallFrameInfo.cpp
+++ b/lldb/source/Symbol/DWARFCallFrameInfo.cpp
@@ -633,7 +633,7 @@ bool DWARFCallFrameInfo::FDEToUnwindPlan(dw_offset_t dwarf_offset,
std::vector<UnwindPlan::RowSP> stack;
- UnwindPlan::Row::RegisterLocation reg_location;
+ UnwindPlan::Row::AbstractRegisterLocation reg_location;
while (m_cfi_data.ValidOffset(offset) && offset < end_offset) {
uint8_t inst = m_cfi_data.GetU8(&offset);
uint8_t primary_opcode = inst & 0xC0;
@@ -822,7 +822,7 @@ bool DWARFCallFrameInfo::HandleCommonDwarfOpcode(uint8_t primary_opcode,
int32_t data_align,
lldb::offset_t &offset,
UnwindPlan::Row &row) {
- UnwindPlan::Row::RegisterLocation reg_location;
+ UnwindPlan::Row::AbstractRegisterLocation reg_location;
if (primary_opcode) {
switch (primary_opcode) {
@@ -852,7 +852,7 @@ bool DWARFCallFrameInfo::HandleCommonDwarfOpcode(uint8_t primary_opcode,
// except for the encoding and size of the register argument.
uint32_t reg_num = (uint32_t)m_cfi_data.GetULEB128(&offset);
int32_t op_offset = (int32_t)m_cfi_data.GetULEB128(&offset) * data_align;
- UnwindPlan::Row::RegisterLocation reg_location;
+ UnwindPlan::Row::AbstractRegisterLocation reg_location;
reg_location.SetAtCFAPlusOffset(op_offset);
row.SetRegisterInfo(reg_num, reg_location);
return true;
@@ -864,7 +864,7 @@ bool DWARFCallFrameInfo::HandleCommonDwarfOpcode(uint8_t primary_opcode,
// number. The required action is to set the rule for the specified
// register to undefined.
uint32_t reg_num = (uint32_t)m_cfi_data.GetULEB128(&offset);
- UnwindPlan::Row::RegisterLocation reg_location;
+ UnwindPlan::Row::AbstractRegisterLocation reg_location;
reg_location.SetUndefined();
row.SetRegisterInfo(reg_num, reg_location);
return true;
@@ -876,7 +876,7 @@ bool DWARFCallFrameInfo::HandleCommonDwarfOpcode(uint8_t primary_opcode,
// number. The required action is to set the rule for the specified
// register to same value.
uint32_t reg_num = (uint32_t)m_cfi_data.GetULEB128(&offset);
- UnwindPlan::Row::RegisterLocation reg_location;
+ UnwindPlan::Row::AbstractRegisterLocation reg_location;
reg_location.SetSame();
row.SetRegisterInfo(reg_num, reg_location);
return true;
@@ -889,7 +889,7 @@ bool DWARFCallFrameInfo::HandleCommonDwarfOpcode(uint8_t primary_opcode,
// second register.
uint32_t reg_num = (uint32_t)m_cfi_data.GetULEB128(&offset);
uint32_t other_reg_num = (uint32_t)m_cfi_data.GetULEB128(&offset);
- UnwindPlan::Row::RegisterLocation reg_location;
+ UnwindPlan::Row::AbstractRegisterLocation reg_location;
reg_location.SetInRegister(other_reg_num);
row.SetRegisterInfo(reg_num, reg_location);
return true;
@@ -950,7 +950,7 @@ bool DWARFCallFrameInfo::HandleCommonDwarfOpcode(uint8_t primary_opcode,
uint32_t block_len = (uint32_t)m_cfi_data.GetULEB128(&offset);
const uint8_t *block_data =
static_cast<const uint8_t *>(m_cfi_data.GetData(&offset, block_len));
- UnwindPlan::Row::RegisterLocation reg_location;
+ UnwindPlan::Row::AbstractRegisterLocation reg_location;
reg_location.SetAtDWARFExpression(block_data, block_len);
row.SetRegisterInfo(reg_num, reg_location);
return true;
@@ -964,7 +964,7 @@ bool DWARFCallFrameInfo::HandleCommonDwarfOpcode(uint8_t primary_opcode,
// signed and factored.
uint32_t reg_num = (uint32_t)m_cfi_data.GetULEB128(&offset);
int32_t op_offset = (int32_t)m_cfi_data.GetSLEB128(&offset) * data_align;
- UnwindPlan::Row::RegisterLocation reg_location;
+ UnwindPlan::Row::AbstractRegisterLocation reg_location;
reg_location.SetAtCFAPlusOffset(op_offset);
row.SetRegisterInfo(reg_num, reg_location);
return true;
diff --git a/lldb/source/Symbol/FuncUnwinders.cpp b/lldb/source/Symbol/FuncUnwinders.cpp
index 228d9a1072deca..d01a899e4f3c67 100644
--- a/lldb/source/Symbol/FuncUnwinders.cpp
+++ b/lldb/source/Symbol/FuncUnwinders.cpp
@@ -371,8 +371,8 @@ LazyBool FuncUnwinders::CompareUnwindPlansForIdenticalInitialPCLocation(
UnwindPlan::RowSP b_first_row = b->GetRowAtIndex(0);
if (a_first_row.get() && b_first_row.get()) {
- UnwindPlan::Row::RegisterLocation a_pc_regloc;
- UnwindPlan::Row::RegisterLocation b_pc_regloc;
+ UnwindPlan::Row::AbstractRegisterLocation a_pc_regloc;
+ UnwindPlan::Row::AbstractRegisterLocation b_pc_regloc;
a_first_row->GetRegisterInfo(pc_reg_lldb_regnum, a_pc_regloc);
b_first_row->GetRegisterInfo(pc_reg_lldb_regnum, b_pc_regloc);
diff --git a/lldb/source/Symbol/UnwindPlan.cpp b/lldb/source/Symbol/UnwindPlan.cpp
index e2dbd81a82c84c..b5a9aa2094f54d 100644
--- a/lldb/source/Symbol/UnwindPlan.cpp
+++ b/lldb/source/Symbol/UnwindPlan.cpp
@@ -22,8 +22,8 @@
using namespace lldb;
using namespace lldb_private;
-bool UnwindPlan::Row::RegisterLocation::
-operator==(const UnwindPlan::Row::RegisterLocation &rhs) const {
+bool UnwindPlan::Row::AbstractRegisterLocation::operator==(
+ const UnwindPlan::Row::AbstractRegisterLocation &rhs) const {
if (m_type == rhs.m_type) {
switch (m_type) {
case unspecified:
@@ -55,7 +55,7 @@ operator==(const UnwindPlan::Row::RegisterLocation &rhs) const {
// This function doesn't copy the dwarf expression bytes; they must remain in
// allocated memory for the lifespan of this UnwindPlan object.
-void UnwindPlan::Row::RegisterLocation::SetAtDWARFExpression(
+void UnwindPlan::Row::AbstractRegisterLocation::SetAtDWARFExpression(
const uint8_t *opcodes, uint32_t len) {
m_type = atDWARFExpression;
m_location.expr.opcodes = opcodes;
@@ -64,7 +64,7 @@ void UnwindPlan::Row::RegisterLocation::SetAtDWARFExpression(
// This function doesn't copy the dwarf expression bytes; they must remain in
// allocated memory for the lifespan of this UnwindPlan object.
-void UnwindPlan::Row::RegisterLocation::SetIsDWARFExpression(
+void UnwindPlan::Row::AbstractRegisterLocation::SetIsDWARFExpression(
const uint8_t *opcodes, uint32_t len) {
m_type = isDWARFExpression;
m_location.expr.opcodes = opcodes;
@@ -92,11 +9...
[truncated]
``````````
</details>
https://github.com/llvm/llvm-project/pull/109611
More information about the lldb-commits
mailing list