[all-commits] [llvm/llvm-project] 13e1cf: Reland "[lldb] Add --all option to "memory region""

David Spickett via All-commits all-commits at lists.llvm.org
Thu May 19 05:17:01 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 13e1cf806567bc4987817e14a774198c3e3f2709
      https://github.com/llvm/llvm-project/commit/13e1cf806567bc4987817e14a774198c3e3f2709
  Author: David Spickett <david.spickett at linaro.org>
  Date:   2022-05-19 (Thu, 19 May 2022)

  Changed paths:
    M lldb/source/Commands/CommandObjectMemory.cpp
    M lldb/source/Commands/Options.td
    M lldb/test/API/functionalities/memory-region/TestMemoryRegion.py
    M lldb/test/API/linux/aarch64/tagged_memory_region/TestAArch64LinuxTaggedMemoryRegion.py
    M llvm/docs/ReleaseNotes.rst

  Log Message:
  -----------
  Reland "[lldb] Add --all option to "memory region""

This reverts commit 3e928c4b9dfb01efd2cb968795e605760828e873.

This fixes an issue seen on Windows where we did not properly
get the section names of regions if they overlapped. Windows
has regions like:
[0x00007fff928db000-0x00007fff949a0000) ---
[0x00007fff949a0000-0x00007fff949a1000) r-- PECOFF header
[0x00007fff949a0000-0x00007fff94a3d000) r-x .hexpthk
[0x00007fff949a0000-0x00007fff94a85000) r-- .rdata
[0x00007fff949a0000-0x00007fff94a88000) rw- .data
[0x00007fff949a0000-0x00007fff94a94000) r-- .pdata
[0x00007fff94a94000-0x00007fff95250000) ---

I assumed that you could just resolve the address and get the section
name using the start of the region but here you'd always get
"PECOFF header" because they all have the same start point.

The usual command repeating loop used the end address of the previous
region when requesting the next, or getting the section name.
So I've matched this in the --all scenario.

In the example above, somehow asking for the region at
0x00007fff949a1000 would get you a region that starts at
0x00007fff949a0000 but has a different end point. Using the load
address you get (what I assume is) the correct section name.




More information about the All-commits mailing list