[all-commits] [llvm/llvm-project] 068f14: [lldb] Add --show-tags option to "memory find"

David Spickett via All-commits all-commits at lists.llvm.org
Thu May 19 06:40:15 PDT 2022


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

  Changed paths:
    M lldb/include/lldb/Interpreter/OptionGroupMemoryTag.h
    M lldb/source/Commands/CommandObjectMemory.cpp
    M lldb/source/Interpreter/OptionGroupMemoryTag.cpp
    M lldb/test/API/commands/help/TestHelp.py
    M lldb/test/API/linux/aarch64/mte_tag_access/TestAArch64LinuxMTEMemoryTagAccess.py
    M lldb/test/API/linux/aarch64/mte_tag_access/main.c
    M llvm/docs/ReleaseNotes.rst

  Log Message:
  -----------
  [lldb] Add --show-tags option to "memory find"

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

Reviewed By: omjavaid

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




More information about the All-commits mailing list