[Lldb-commits] [PATCH] D97285: [lldb][AArch64] Add "memory tag read" command

David Spickett via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Tue Feb 23 06:36:08 PST 2021


DavidSpickett created this revision.
Herald added subscribers: danielkiss, kristof.beyls, mgorny.
DavidSpickett requested review of this revision.
Herald added a project: LLDB.
Herald added a subscriber: lldb-commits.

This new command looks much like "memory read"
and mirrors its basic behaviour.

(lldb) memory tag read new_buf_ptr new_buf_ptr+32
Logical tag: 0x9
Allocation tags:
[0x900fffff7ffa000, 0x900fffff7ffa010): 0x9
[0x900fffff7ffa010, 0x900fffff7ffa020): 0x0

Important proprties:

- The end address is optional and defaults to reading 1 tag if ommitted
- It is an error to try to read tags if the architecture or process doesn't support it, or if the range asked for is not tagged.
- It is an error to read an inverted range (end < begin) (logical tags are removed for this check so you can pass tagged addresses here)
- The range will be expanded to fit the tagging granule, so you can get more tags than simply (end-begin)/granule size. Whatever you get back will always cover the original range.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D97285

Files:
  lldb/source/Commands/CMakeLists.txt
  lldb/source/Commands/CommandObjectMemory.cpp
  lldb/source/Commands/CommandObjectMemoryTag.cpp
  lldb/source/Commands/CommandObjectMemoryTag.h
  lldb/test/API/functionalities/memory/tag/Makefile
  lldb/test/API/functionalities/memory/tag/TestMemoryTag.py
  lldb/test/API/functionalities/memory/tag/main.cpp
  lldb/test/API/linux/aarch64/mte_tag_read/Makefile
  lldb/test/API/linux/aarch64/mte_tag_read/TestAArch64LinuxMTEMemoryTagRead.py
  lldb/test/API/linux/aarch64/mte_tag_read/main.c

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D97285.325771.patch
Type: text/x-patch
Size: 17024 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20210223/f2500e7f/attachment-0001.bin>


More information about the lldb-commits mailing list