[all-commits] [llvm/llvm-project] 31f996: [lldb][AArch64] Add "memory tag read" command

David Spickett via All-commits all-commits at lists.llvm.org
Thu Jun 24 09:36:00 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 31f9960c38529ce805edf9764535eb0ce188cadf
      https://github.com/llvm/llvm-project/commit/31f9960c38529ce805edf9764535eb0ce188cadf
  Author: David Spickett <david.spickett at linaro.org>
  Date:   2021-06-24 (Thu, 24 Jun 2021)

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

  Log Message:
  -----------
  [lldb][AArch64] Add "memory tag read" command

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.

Reviewed By: omjavaid

Differential Revision: https://reviews.llvm.org/D97285




More information about the All-commits mailing list