[Lldb-commits] [lldb] [lldb] Make single-argument Address constructor explicit (NFCI) (PR #189035)
via lldb-commits
lldb-commits at lists.llvm.org
Fri Mar 27 09:03:09 PDT 2026
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-backend-mips
Author: Sergei Barannikov (s-barannikov)
<details>
<summary>Changes</summary>
This is to highlight places where we (probably unintentionally) construct an `Address` object from an already resolved address, making it unresolved again.
See the changes in `DynamicLoaderDarwin.cpp` for a quick example.
---
Patch is 21.14 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/189035.diff
23 Files Affected:
- (modified) lldb/include/lldb/Core/Address.h (+1-1)
- (modified) lldb/source/Breakpoint/BreakpointLocation.cpp (+2-2)
- (modified) lldb/source/Commands/CommandObjectMemory.cpp (+2-2)
- (modified) lldb/source/Commands/CommandObjectTarget.cpp (+4-3)
- (modified) lldb/source/Core/Address.cpp (+1-1)
- (modified) lldb/source/DataFormatters/FormattersHelpers.cpp (+1-1)
- (modified) lldb/source/DataFormatters/StringPrinter.cpp (+1-2)
- (modified) lldb/source/Expression/DWARFExpression.cpp (+4-4)
- (modified) lldb/source/Plugins/Architecture/Mips/ArchitectureMips.cpp (+1-1)
- (modified) lldb/source/Plugins/DynamicLoader/FreeBSD-Kernel/DynamicLoaderFreeBSDKernel.cpp (-2)
- (modified) lldb/source/Plugins/DynamicLoader/Hexagon-DYLD/DynamicLoaderHexagonDYLD.cpp (+1-1)
- (modified) lldb/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderDarwin.cpp (+2-1)
- (modified) lldb/source/Plugins/InstrumentationRuntime/MainThreadChecker/InstrumentationRuntimeMainThreadChecker.cpp (+1-1)
- (modified) lldb/source/Plugins/Language/ObjC/CFBasicHash.cpp (+2-2)
- (modified) lldb/source/Plugins/Language/ObjC/CFBasicHash.h (+1-1)
- (modified) lldb/source/Plugins/Language/ObjC/NSString.cpp (+7-7)
- (modified) lldb/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABIRuntime.cpp (+1-1)
- (modified) lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp (+6-4)
- (modified) lldb/source/Plugins/SymbolFile/CTF/SymbolFileCTF.cpp (+2-1)
- (modified) lldb/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.cpp (+1-1)
- (modified) lldb/source/Target/StackFrame.cpp (+2-2)
- (modified) lldb/source/Target/Target.cpp (+1-1)
- (modified) lldb/source/ValueObject/ValueObjectDynamicValue.cpp (+1-1)
``````````diff
diff --git a/lldb/include/lldb/Core/Address.h b/lldb/include/lldb/Core/Address.h
index 85b2ab7bb3cfe..71078bb44e57f 100644
--- a/lldb/include/lldb/Core/Address.h
+++ b/lldb/include/lldb/Core/Address.h
@@ -160,7 +160,7 @@ class Address {
/// A list of sections, one of which may contain the \a file_addr.
Address(lldb::addr_t file_addr, const SectionList *section_list);
- Address(lldb::addr_t abs_addr);
+ explicit Address(lldb::addr_t abs_addr);
/// Assignment operator.
///
diff --git a/lldb/source/Breakpoint/BreakpointLocation.cpp b/lldb/source/Breakpoint/BreakpointLocation.cpp
index 1ec60b8fa32ec..3658085940e1a 100644
--- a/lldb/source/Breakpoint/BreakpointLocation.cpp
+++ b/lldb/source/Breakpoint/BreakpointLocation.cpp
@@ -49,8 +49,8 @@ BreakpointLocation::BreakpointLocation(break_id_t loc_id, Breakpoint &owner,
BreakpointLocation::BreakpointLocation(break_id_t loc_id, Breakpoint &owner)
: m_should_resolve_indirect_functions(false), m_is_reexported(false),
- m_is_indirect(false), m_address(LLDB_INVALID_ADDRESS), m_owner(owner),
- m_condition_hash(0), m_loc_id(loc_id), m_hit_counter() {
+ m_is_indirect(false), m_owner(owner), m_condition_hash(0),
+ m_loc_id(loc_id), m_hit_counter() {
SetThreadIDInternal(LLDB_INVALID_THREAD_ID);
}
diff --git a/lldb/source/Commands/CommandObjectMemory.cpp b/lldb/source/Commands/CommandObjectMemory.cpp
index 3b416028ee410..49d6eed157eb4 100644
--- a/lldb/source/Commands/CommandObjectMemory.cpp
+++ b/lldb/source/Commands/CommandObjectMemory.cpp
@@ -703,8 +703,8 @@ class CommandObjectMemoryRead : public CommandObjectParsed {
std::string buffer;
buffer.resize(item_byte_size + 1, 0);
Status error;
- size_t read = target->ReadCStringFromMemory(data_addr, &buffer[0],
- item_byte_size + 1, error);
+ size_t read = target->ReadCStringFromMemory(
+ Address(data_addr), &buffer[0], item_byte_size + 1, error);
if (error.Fail()) {
result.AppendErrorWithFormat(
"failed to read memory from 0x%" PRIx64 ".\n", addr);
diff --git a/lldb/source/Commands/CommandObjectTarget.cpp b/lldb/source/Commands/CommandObjectTarget.cpp
index 64b9500b23634..166d9ba589797 100644
--- a/lldb/source/Commands/CommandObjectTarget.cpp
+++ b/lldb/source/Commands/CommandObjectTarget.cpp
@@ -3632,9 +3632,10 @@ class CommandObjectTargetModulesShowUnwind : public CommandObjectParsed {
UnwindTable &uw_table = sc.module_sp->GetUnwindTable();
FuncUnwindersSP func_unwinders_sp =
m_options.m_cached
- ? uw_table.GetFuncUnwindersContainingAddress(start_addr, sc)
- : uw_table.GetUncachedFuncUnwindersContainingAddress(start_addr,
- sc);
+ ? uw_table.GetFuncUnwindersContainingAddress(Address(start_addr),
+ sc)
+ : uw_table.GetUncachedFuncUnwindersContainingAddress(
+ Address(start_addr), sc);
if (!func_unwinders_sp)
continue;
diff --git a/lldb/source/Core/Address.cpp b/lldb/source/Core/Address.cpp
index f19d22b3c0d6d..dd550028c5f7e 100644
--- a/lldb/source/Core/Address.cpp
+++ b/lldb/source/Core/Address.cpp
@@ -748,7 +748,7 @@ bool Address::Dump(Stream *s, ExecutionContextScope *exe_scope, DumpStyle style,
DumpAddressRange(s->AsRawOstream(), range->GetRangeBase(),
range->GetRangeEnd(), addr_size);
s->PutCString(", location = ");
- var_sp->DumpLocations(s, all_ranges ? LLDB_INVALID_ADDRESS : *this);
+ var_sp->DumpLocations(s, all_ranges ? Address() : *this);
s->PutCString(", decl = ");
var_sp->GetDeclaration().DumpStopContext(s, false);
s->EOL();
diff --git a/lldb/source/DataFormatters/FormattersHelpers.cpp b/lldb/source/DataFormatters/FormattersHelpers.cpp
index 9b1ee8e7f6bc3..ce65de05547e7 100644
--- a/lldb/source/DataFormatters/FormattersHelpers.cpp
+++ b/lldb/source/DataFormatters/FormattersHelpers.cpp
@@ -125,7 +125,7 @@ lldb_private::formatters::GetArrayAddressOrPointerValue(ValueObject &valobj) {
data_addr.type == eAddressTypeFile)
return Address(data_addr.address, valobj.GetModule()->GetSectionList());
- return data_addr.address;
+ return Address(data_addr.address);
}
void lldb_private::formatters::DumpCxxSmartPtrPointerSummary(
diff --git a/lldb/source/DataFormatters/StringPrinter.cpp b/lldb/source/DataFormatters/StringPrinter.cpp
index 2571784250175..60cb0fc5d6876 100644
--- a/lldb/source/DataFormatters/StringPrinter.cpp
+++ b/lldb/source/DataFormatters/StringPrinter.cpp
@@ -404,8 +404,7 @@ static bool ReadEncodedBufferAndDumpToStream(
if (!options.GetStream())
return false;
- if (options.GetLocation() == 0 ||
- options.GetLocation() == LLDB_INVALID_ADDRESS)
+ if (options.GetLocation() == Address(0) || options.GetLocation() == Address())
return false;
lldb::TargetSP target_sp = options.GetTargetSP();
diff --git a/lldb/source/Expression/DWARFExpression.cpp b/lldb/source/Expression/DWARFExpression.cpp
index c23471a2c1219..7f59fe827cf25 100644
--- a/lldb/source/Expression/DWARFExpression.cpp
+++ b/lldb/source/Expression/DWARFExpression.cpp
@@ -1899,10 +1899,10 @@ llvm::Expected<Value> DWARFExpression::Evaluate(
case Value::ValueType::LoadAddress: {
if (target) {
if (curr_piece.ResizeData(piece_byte_size) == piece_byte_size) {
- if (target->ReadMemory(addr, curr_piece.GetBuffer().GetBytes(),
- piece_byte_size, error,
- /*force_live_memory=*/false) !=
- piece_byte_size) {
+ if (target->ReadMemory(
+ Address(addr), curr_piece.GetBuffer().GetBytes(),
+ piece_byte_size, error,
+ /*force_live_memory=*/false) != piece_byte_size) {
const char *addr_type = (curr_piece_source_value_type ==
Value::ValueType::LoadAddress)
? "load"
diff --git a/lldb/source/Plugins/Architecture/Mips/ArchitectureMips.cpp b/lldb/source/Plugins/Architecture/Mips/ArchitectureMips.cpp
index 3748be0533ad7..bb838558269f7 100644
--- a/lldb/source/Plugins/Architecture/Mips/ArchitectureMips.cpp
+++ b/lldb/source/Plugins/Architecture/Mips/ArchitectureMips.cpp
@@ -113,7 +113,7 @@ lldb::addr_t ArchitectureMips::GetBreakableLoadAddress(lldb::addr_t addr,
if (current_offset == 0)
return addr;
- auto insn = GetInstructionAtAddress(target, current_offset, addr);
+ auto insn = GetInstructionAtAddress(target, Address(current_offset), addr);
if (nullptr == insn || !insn->HasDelaySlot())
return addr;
diff --git a/lldb/source/Plugins/DynamicLoader/FreeBSD-Kernel/DynamicLoaderFreeBSDKernel.cpp b/lldb/source/Plugins/DynamicLoader/FreeBSD-Kernel/DynamicLoaderFreeBSDKernel.cpp
index a0b3a4d85c4e4..00b1de6aee369 100644
--- a/lldb/source/Plugins/DynamicLoader/FreeBSD-Kernel/DynamicLoaderFreeBSDKernel.cpp
+++ b/lldb/source/Plugins/DynamicLoader/FreeBSD-Kernel/DynamicLoaderFreeBSDKernel.cpp
@@ -255,8 +255,6 @@ void DynamicLoaderFreeBSDKernel::DebuggerInit(
DynamicLoaderFreeBSDKernel::DynamicLoaderFreeBSDKernel(Process *process,
addr_t kernel_address)
: DynamicLoader(process), m_process(process),
- m_linker_file_list_struct_addr(LLDB_INVALID_ADDRESS),
- m_linker_file_head_addr(LLDB_INVALID_ADDRESS),
m_kernel_load_address(kernel_address), m_mutex() {
process->SetCanRunCode(false);
}
diff --git a/lldb/source/Plugins/DynamicLoader/Hexagon-DYLD/DynamicLoaderHexagonDYLD.cpp b/lldb/source/Plugins/DynamicLoader/Hexagon-DYLD/DynamicLoaderHexagonDYLD.cpp
index 2d010db960707..dc0e70a471aca 100644
--- a/lldb/source/Plugins/DynamicLoader/Hexagon-DYLD/DynamicLoaderHexagonDYLD.cpp
+++ b/lldb/source/Plugins/DynamicLoader/Hexagon-DYLD/DynamicLoaderHexagonDYLD.cpp
@@ -289,7 +289,7 @@ bool DynamicLoaderHexagonDYLD::SetRendezvousBreakpoint() {
// Make sure our breakpoint is at the right address.
assert(target.GetBreakpointByID(m_dyld_bid)
- ->FindLocationByAddress(break_addr)
+ ->FindLocationByAddress(Address(break_addr))
->GetBreakpoint()
.GetID() == m_dyld_bid);
diff --git a/lldb/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderDarwin.cpp b/lldb/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderDarwin.cpp
index 474d908810e0e..afa0ef28a381d 100644
--- a/lldb/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderDarwin.cpp
+++ b/lldb/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderDarwin.cpp
@@ -1037,7 +1037,8 @@ DynamicLoaderDarwin::GetStepThroughTrampolinePlan(Thread &thread,
current_symbol->GetName().GetCString(),
actual_symbol->GetName().GetCString(),
target_addr.GetLoadAddress(target_sp.get()));
- addresses.push_back(target_addr.GetLoadAddress(target_sp.get()));
+ addresses.push_back(
+ Address(target_addr.GetLoadAddress(target_sp.get())));
}
}
}
diff --git a/lldb/source/Plugins/InstrumentationRuntime/MainThreadChecker/InstrumentationRuntimeMainThreadChecker.cpp b/lldb/source/Plugins/InstrumentationRuntime/MainThreadChecker/InstrumentationRuntimeMainThreadChecker.cpp
index b89a6aa176919..3b63ca2193028 100644
--- a/lldb/source/Plugins/InstrumentationRuntime/MainThreadChecker/InstrumentationRuntimeMainThreadChecker.cpp
+++ b/lldb/source/Plugins/InstrumentationRuntime/MainThreadChecker/InstrumentationRuntimeMainThreadChecker.cpp
@@ -103,7 +103,7 @@ InstrumentationRuntimeMainThreadChecker::RetrieveReportData(
std::string apiName;
Status read_error;
- target.ReadCStringFromMemory(apiname_ptr, apiName, read_error);
+ target.ReadCStringFromMemory(Address(apiname_ptr), apiName, read_error);
if (read_error.Fail())
return StructuredData::ObjectSP();
diff --git a/lldb/source/Plugins/Language/ObjC/CFBasicHash.cpp b/lldb/source/Plugins/Language/ObjC/CFBasicHash.cpp
index 42cda0146f2e0..e434c68c77496 100644
--- a/lldb/source/Plugins/Language/ObjC/CFBasicHash.cpp
+++ b/lldb/source/Plugins/Language/ObjC/CFBasicHash.cpp
@@ -6,7 +6,7 @@ using namespace lldb;
using namespace lldb_private;
bool CFBasicHash::IsValid() const {
- if (m_address != LLDB_INVALID_ADDRESS) {
+ if (m_address != Address()) {
if (m_ptr_size == 4 && m_ht_32)
return true;
else if (m_ptr_size == 8 && m_ht_64)
@@ -21,7 +21,7 @@ bool CFBasicHash::Update(addr_t addr, ExecutionContextRef exe_ctx_rf) {
if (addr == LLDB_INVALID_ADDRESS || !addr)
return false;
- m_address = addr;
+ m_address = Address(addr);
m_exe_ctx_ref = exe_ctx_rf;
m_ptr_size =
m_exe_ctx_ref.GetTargetSP()->GetArchitecture().GetAddressByteSize();
diff --git a/lldb/source/Plugins/Language/ObjC/CFBasicHash.h b/lldb/source/Plugins/Language/ObjC/CFBasicHash.h
index f850c50342a30..a85a618094d44 100644
--- a/lldb/source/Plugins/Language/ObjC/CFBasicHash.h
+++ b/lldb/source/Plugins/Language/ObjC/CFBasicHash.h
@@ -62,7 +62,7 @@ class CFBasicHash {
uint32_t m_ptr_size = UINT32_MAX;
lldb::ByteOrder m_byte_order = lldb::eByteOrderInvalid;
- Address m_address = LLDB_INVALID_ADDRESS;
+ Address m_address;
std::unique_ptr<__CFBasicHash<uint32_t>> m_ht_32 = nullptr;
std::unique_ptr<__CFBasicHash<uint64_t>> m_ht_64 = nullptr;
ExecutionContextRef m_exe_ctx_ref;
diff --git a/lldb/source/Plugins/Language/ObjC/NSString.cpp b/lldb/source/Plugins/Language/ObjC/NSString.cpp
index 2626b9a3f7b8a..b7cc0062a9e68 100644
--- a/lldb/source/Plugins/Language/ObjC/NSString.cpp
+++ b/lldb/source/Plugins/Language/ObjC/NSString.cpp
@@ -145,7 +145,7 @@ bool lldb_private::formatters::NSStringSummaryProvider(
if (error.Fail())
return false;
if (has_explicit_length && is_unicode) {
- options.SetLocation(location);
+ options.SetLocation(Address(location));
options.SetTargetSP(valobj.GetTargetSP());
options.SetStream(&stream);
options.SetQuote('"');
@@ -158,7 +158,7 @@ bool lldb_private::formatters::NSStringSummaryProvider(
return StringPrinter::ReadStringAndDumpToStream<
StringPrinter::StringElementType::UTF16>(options);
} else {
- options.SetLocation(location + 1);
+ options.SetLocation(Address(location + 1));
options.SetTargetSP(valobj.GetTargetSP());
options.SetStream(&stream);
options.SetSourceSize(explicit_length);
@@ -174,7 +174,7 @@ bool lldb_private::formatters::NSStringSummaryProvider(
!is_path_store && !is_mutable) {
uint64_t location = 3 * ptr_size + valobj_addr;
- options.SetLocation(location);
+ options.SetLocation(Address(location));
options.SetTargetSP(valobj.GetTargetSP());
options.SetStream(&stream);
options.SetQuote('"');
@@ -196,7 +196,7 @@ bool lldb_private::formatters::NSStringSummaryProvider(
if (error.Fail())
return false;
}
- options.SetLocation(location);
+ options.SetLocation(Address(location));
options.SetTargetSP(valobj.GetTargetSP());
options.SetStream(&stream);
options.SetQuote('"');
@@ -222,7 +222,7 @@ bool lldb_private::formatters::NSStringSummaryProvider(
explicit_length = length_valobj_sp->GetValueAsUnsigned(0) >> 20;
lldb::addr_t location = valobj.GetValueAsUnsigned(0) + ptr_size + 4;
- options.SetLocation(location);
+ options.SetLocation(Address(location));
options.SetTargetSP(valobj.GetTargetSP());
options.SetStream(&stream);
options.SetQuote('"');
@@ -245,7 +245,7 @@ bool lldb_private::formatters::NSStringSummaryProvider(
has_explicit_length = !(error.Fail() || explicit_length == 0);
location++;
}
- options.SetLocation(location);
+ options.SetLocation(Address(location));
options.SetTargetSP(valobj.GetTargetSP());
options.SetStream(&stream);
options.SetSourceSize(explicit_length);
@@ -268,7 +268,7 @@ bool lldb_private::formatters::NSStringSummaryProvider(
if (has_explicit_length && !has_null)
explicit_length++; // account for the fact that there is no NULL and we
// need to have one added
- options.SetLocation(location);
+ options.SetLocation(Address(location));
options.SetTargetSP(valobj.GetTargetSP());
options.SetStream(&stream);
options.SetSourceSize(explicit_length);
diff --git a/lldb/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABIRuntime.cpp b/lldb/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABIRuntime.cpp
index 797abd8b0aa19..9a76d94b4e7c2 100644
--- a/lldb/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABIRuntime.cpp
+++ b/lldb/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABIRuntime.cpp
@@ -307,7 +307,7 @@ bool ItaniumABIRuntime::GetDynamicTypeAndAddress(
return false;
Status error;
const int64_t offset_to_top = target.ReadSignedIntegerFromMemory(
- offset_to_top_location, addr_byte_size, INT64_MIN, error);
+ Address(offset_to_top_location), addr_byte_size, INT64_MIN, error);
if (offset_to_top == INT64_MIN)
return false;
diff --git a/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp b/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
index 565a12c4ff85e..b1994f5e94637 100644
--- a/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
+++ b/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
@@ -978,7 +978,8 @@ Address ObjectFileELF::GetImageInfoAddress(Target *target) {
if (symbol.d_tag == DT_MIPS_RLD_MAP) {
// DT_MIPS_RLD_MAP tag stores an absolute address of the debug pointer.
Address addr;
- if (target->ReadPointerFromMemory(d_load_addr, error, addr, true))
+ if (target->ReadPointerFromMemory(Address(d_load_addr), error, addr,
+ true))
return addr;
}
if (symbol.d_tag == DT_MIPS_RLD_MAP_REL) {
@@ -986,7 +987,8 @@ Address ObjectFileELF::GetImageInfoAddress(Target *target) {
// relative to the address of the tag.
uint64_t rel_offset;
rel_offset = target->ReadUnsignedIntegerFromMemory(
- d_load_addr, GetAddressByteSize(), UINT64_MAX, error, true);
+ Address(d_load_addr), GetAddressByteSize(), UINT64_MAX, error,
+ true);
if (error.Success() && rel_offset != UINT64_MAX) {
Address addr;
addr_t debug_ptr_address =
@@ -1025,7 +1027,7 @@ Address ObjectFileELF::GetBaseAddress() {
if (header.sh_flags & SHF_ALLOC)
return Address(GetSectionList()->FindSectionByID(SectionIndex(I)), 0);
}
- return LLDB_INVALID_ADDRESS;
+ return Address();
}
for (const auto &EnumPHdr : llvm::enumerate(ProgramHeaders())) {
@@ -1036,7 +1038,7 @@ Address ObjectFileELF::GetBaseAddress() {
return Address(
GetSectionList()->FindSectionByID(SegmentID(EnumPHdr.index())), 0);
}
- return LLDB_INVALID_ADDRESS;
+ return Address();
}
size_t ObjectFileELF::ParseDependentModules() {
diff --git a/lldb/source/Plugins/SymbolFile/CTF/SymbolFileCTF.cpp b/lldb/source/Plugins/SymbolFile/CTF/SymbolFileCTF.cpp
index 2f6235ea5e766..09251e2f57e1c 100644
--- a/lldb/source/Plugins/SymbolFile/CTF/SymbolFileCTF.cpp
+++ b/lldb/source/Plugins/SymbolFile/CTF/SymbolFileCTF.cpp
@@ -959,7 +959,8 @@ uint32_t SymbolFileCTF::ResolveSymbolContext(const Address &so_addr,
// Resolve variables.
if (resolve_scope & eSymbolContextVariable) {
for (VariableSP variable_sp : m_variables) {
- if (variable_sp->LocationIsValidForAddress(so_addr.GetFileAddress())) {
+ if (variable_sp->LocationIsValidForAddress(
+ Address(so_addr.GetFileAddress()))) {
sc.variable = variable_sp.get();
break;
}
diff --git a/lldb/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.cpp b/lldb/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.cpp
index 1f225c4c70e29..3518a919c67da 100644
--- a/lldb/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.cpp
+++ b/lldb/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.cpp
@@ -1826,7 +1826,7 @@ void SymbolFileNativePDB::ParseInlineSite(PdbCompilandSymId id,
S_INLINESITE) {
// Its parent is another inline site, lookup parent site's range vector
// for callsite line.
- ParseInlineSite(parent_id, func_base);
+ ParseInlineSite(parent_id, Address(func_base));
std::shared_ptr<InlineSite> parent_site =
m_inline_sites[toOpaqueUid(parent_id)];
FileSpec &parent_decl_file =
diff --git a/lldb/source/Target/StackFrame.cpp b/lldb/source/Target/StackFrame.cpp
index 9fb26176e43c0..d3403403ee5e6 100644
--- a/lldb/source/Target/StackFrame.cpp
+++ b/lldb/source/Target/StackFrame.cpp
@@ -65,7 +65,7 @@ StackFrame::StackFrame(const ThreadSP &thread_sp, user_id_t frame_idx,
: m_thread_wp(thread_sp), m_frame_index(frame_idx),
m_concrete_frame_index(unwind_frame_index), m_reg_context_sp(),
m_id(pc, cfa, nullptr, thread_sp->GetProcess().get()),
- m_frame_code_addr(pc), m_sc(), m_flags(), m_frame_base(),
+ m_frame_code_addr(Address(pc)), m_sc(), m_flags(), m_frame_base(),
m_frame_base_error(), m_cfa_is_valid(cfa_is_valid),
m_stack_frame_kind(kind), m_artificial(artificial),
m_behaves_like_zeroth_frame(behaves_like_zeroth_frame),
@@ -93,7 +93,7 @@ StackFrame::StackFrame(const ThreadSP &thread_sp, user_id_t frame_idx,
m_concrete_frame_index(unwind_frame_index),
m_reg_context_sp(reg_context_sp),
m_id(pc, cfa, nullptr, thread_sp->GetProcess().get()),
- m_frame_code_addr(pc), m_sc(), m_flags(), m_frame_base(),
+ m_frame_code_addr(Address(pc)), m_sc(), m_flags(), m_frame_base(),
m_frame_base_error(), m_cfa_is_valid(true),
m_stack_frame_kind(StackFrame::Kind::Regular), m_artificial(false),
m_behaves_like_zeroth_frame(behaves_like_zeroth_frame),
diff --git a/lldb/source/Target/Target.cpp b/lldb/source/Target/Target.cpp
index 126a2b57ed4b4..250d3f337a7bb 100644
--- a/lldb/source/Target/Target.cpp
+++ b/lldb/source/Target/Targ...
[truncated]
``````````
</details>
https://github.com/llvm/llvm-project/pull/189035
More information about the lldb-commits
mailing list