[all-commits] [llvm/llvm-project] 1ca8a9: [lldb][Windows] Fix memory region base addresses w...
David Spickett via All-commits
all-commits at lists.llvm.org
Thu Jul 7 06:56:06 PDT 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 1ca8a978023f1c1fe6018ac87ed06b7ce26f0b77
https://github.com/llvm/llvm-project/commit/1ca8a978023f1c1fe6018ac87ed06b7ce26f0b77
Author: David Spickett <david.spickett at linaro.org>
Date: 2022-07-07 (Thu, 07 Jul 2022)
Changed paths:
M lldb/source/Plugins/Process/Windows/Common/ProcessDebugger.cpp
M lldb/test/API/functionalities/memory-region/TestMemoryRegion.py
Log Message:
-----------
[lldb][Windows] Fix memory region base addresses when a range is split
Previously we recorded AllocationBase as the base address of the region
we get from VirtualQueryEx. However, this is the base of the allocation,
which can later be split into more regions.
So you got stuff like:
[0x00007fff377c0000-0x00007fff377c1000) r-- PECOFF header
[0x00007fff377c0000-0x00007fff37840000) r-x .text
[0x00007fff377c0000-0x00007fff37870000) r-- .rdata
Where all the base addresses were the same.
Instead, use BaseAddress as the base of the region. So we get:
[0x00007fff377c0000-0x00007fff377c1000) r-- PECOFF header
[0x00007fff377c1000-0x00007fff37840000) r-x .text
[0x00007fff37840000-0x00007fff37870000) r-- .rdata
https://docs.microsoft.com/en-us/windows/win32/api/winnt/ns-winnt-memory_basic_information
The added test checks for any overlapping regions which means
if we get the base or size wrong it'll fail. This logic
applies to any OS so the test isn't restricted to Windows.
Reviewed By: labath
Differential Revision: https://reviews.llvm.org/D129272
More information about the All-commits
mailing list