Skip to content

Commit d098df3

Browse files
fixup! Fix address confusion
1 parent 579c985 commit d098df3

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

lldb/source/Expression/IRMemoryMap.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -641,13 +641,13 @@ void IRMemoryMap::WritePointerToMemory(lldb::addr_t process_address,
641641
error.Clear();
642642

643643
/// Only ask the Process to fix the address if this address belongs to the
644-
/// process. An address belongs to the process if the Allocation contains a
645-
/// non-empty m_data member.
646-
if (auto it = FindAllocation(process_address, 1);
647-
it != m_allocations.end() && it->second.m_data.GetByteSize() == 0) {
644+
/// process. An address belongs to the process if the Allocation policy is not
645+
/// eAllocationPolicyHostOnly.
646+
auto it = FindAllocation(address, 1);
647+
if (it == m_allocations.end() ||
648+
it->second.m_policy != AllocationPolicy::eAllocationPolicyHostOnly)
648649
if (auto process_sp = GetProcessWP().lock())
649650
address = process_sp->FixAnyAddress(address);
650-
}
651651

652652
Scalar scalar(address);
653653

0 commit comments

Comments
 (0)