[Lldb-commits] [PATCH] D125090: [lldb] Add --show-tags option to "memory find"

David Spickett via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Fri May 6 05:46:52 PDT 2022


DavidSpickett created this revision.
Herald added a project: All.
DavidSpickett requested review of this revision.
Herald added a project: LLDB.
Herald added a subscriber: lldb-commits.

This is off by default. If you get a result and that
memory has memory tags, when --show-tags is given you'll
see the tags inline with the memory content.

(lldb) memory read mte_buf mte_buf+64 --show-tags
<...>
0xfffff7ff8020: 00 00 00 00 00 00 00 00 0d f0 fe ca 00 00 00 00 ................ (tag: 0x2)
<...>
(lldb) memory find -e 0xcafef00d mte_buf mte_buf+64 --show-tags
data found at location: 0xfffff7ff8028
0xfffff7ff8028: 0d f0 fe ca 00 00 00 00 00 00 00 00 00 00 00 00 ................ (tags: 0x2 0x3)
0xfffff7ff8038: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ (tags: 0x3 0x4)

The logic for handling alignments is the same as for memory read
so in the above example because the line starts misaligned to the
granule it covers 2 granules.

Depends on D125089 <https://reviews.llvm.org/D125089>


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D125090

Files:
  lldb/include/lldb/Interpreter/OptionGroupMemoryTag.h
  lldb/source/Commands/CommandObjectMemory.cpp
  lldb/source/Interpreter/OptionGroupMemoryTag.cpp
  lldb/test/API/commands/help/TestHelp.py
  lldb/test/API/linux/aarch64/mte_tag_access/TestAArch64LinuxMTEMemoryTagAccess.py
  lldb/test/API/linux/aarch64/mte_tag_access/main.c

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D125090.427606.patch
Type: text/x-patch
Size: 7952 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20220506/303a34c7/attachment.bin>


More information about the lldb-commits mailing list