Skip to content

Commit 9cab114

Browse files
author
George Hu
committed
[lldb] Fix address to read segment data
1 parent 6a01ac7 commit 9cab114

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lldb/source/Plugins/Process/elf-core/ProcessElfCore.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1047,9 +1047,9 @@ UUID ProcessElfCore::FindBuidIdInCoreMemory(lldb::addr_t address) {
10471047
std::vector<uint8_t> note_bytes;
10481048
note_bytes.resize(program_header.p_memsz);
10491049

1050-
// We need to slide the address of the p_vaddr as these values don't get
1050+
// We need to slide the address of the p_offset as these values don't get
10511051
// relocated in memory.
1052-
const lldb::addr_t vaddr = program_header.p_vaddr + address;
1052+
const lldb::addr_t vaddr = program_header.p_offset + address;
10531053
byte_read =
10541054
ReadMemory(vaddr, note_bytes.data(), program_header.p_memsz, error);
10551055
if (byte_read != program_header.p_memsz)

0 commit comments

Comments
 (0)