Skip to content

Commit 825738f

Browse files
[lldb][nfc] Rename WritePointerToMemory argument's name (llvm#157566)
One of those arguments should be called `pointer` to correlate it to the name of the function and to distinguish it from the address where it will be written. (cherry picked from commit d367c7d) (cherry picked from commit d695eb0)
1 parent 78b6f48 commit 825738f

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

lldb/include/lldb/Expression/IRMemoryMap.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ class IRMemoryMap {
6565
size_t size, Status &error);
6666
void WriteScalarToMemory(lldb::addr_t process_address, Scalar &scalar,
6767
size_t size, Status &error);
68-
void WritePointerToMemory(lldb::addr_t process_address, lldb::addr_t address,
68+
void WritePointerToMemory(lldb::addr_t process_address, lldb::addr_t pointer,
6969
Status &error);
7070
void ReadMemory(uint8_t *bytes, lldb::addr_t process_address, size_t size,
7171
Status &error);

lldb/source/Expression/IRMemoryMap.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -637,19 +637,19 @@ void IRMemoryMap::WriteScalarToMemory(lldb::addr_t process_address,
637637
}
638638

639639
void IRMemoryMap::WritePointerToMemory(lldb::addr_t process_address,
640-
lldb::addr_t address, Status &error) {
640+
lldb::addr_t pointer, Status &error) {
641641
error.Clear();
642642

643-
/// Only ask the Process to fix the address if this address belongs to the
643+
/// Only ask the Process to fix `pointer` if the address belongs to the
644644
/// process. An address belongs to the process if the Allocation policy is not
645645
/// eAllocationPolicyHostOnly.
646-
auto it = FindAllocation(address, 1);
646+
auto it = FindAllocation(pointer, 1);
647647
if (it == m_allocations.end() ||
648648
it->second.m_policy != AllocationPolicy::eAllocationPolicyHostOnly)
649649
if (auto process_sp = GetProcessWP().lock())
650-
address = process_sp->FixAnyAddress(address);
650+
pointer = process_sp->FixAnyAddress(pointer);
651651

652-
Scalar scalar(address);
652+
Scalar scalar(pointer);
653653

654654
WriteScalarToMemory(process_address, scalar, GetAddressByteSize(), error);
655655
}

0 commit comments

Comments
 (0)