[Lldb-commits] [PATCH] D111791: [lldb] Add --all option to "memory region"

David Spickett via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Wed May 18 03:29:20 PDT 2022


DavidSpickett updated this revision to Diff 430312.
DavidSpickett added a comment.

Fixup the loop on systems that have more non-address bits than just top byte ignore.

With only top byte ignore:

- We ask the remote for the last region
- It says ok it's unmapped and it ends at 0xF....F
- Then we mask that address using just the top byte ignore but because the PAC sign bit is set we actually or in the mask which keeps all the bits set.
- We ask for a region at LLDB_INVALID_ADDRESS which fails and we break.

With top byte ignore plus pointer auth:

- We ask for the last region
- It returns a range with end address 0x0001000000000000
- Then we ask for the next region
- Which masks that address with 0xFFFF0...0 and gets 0
- Which gives you the first region and we loop forever

This is the same thing I did to fix the manual command repetition but
because we got away without it on a TBI only system I didn't notice it
until now.

I figured it needed the same fix but took a bit to figure out why.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D111791/new/

https://reviews.llvm.org/D111791

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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D111791.430312.patch
Type: text/x-patch
Size: 15371 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20220518/906755b6/attachment.bin>


More information about the lldb-commits mailing list