HomePhabricator

[lldb][AArch64] Add "memory tag read" command

Authored by DavidSpickett on Feb 19 2021, 8:31 AM.

Description

[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

Details

Committed
DavidSpickettJun 24 2021, 9:35 AM
Reviewer
omjavaid
Differential Revision
D97285: [lldb][AArch64] Add "memory tag read" command
Parents
rG10b8eb482cb6: [mlir] remove repeated use of TypeToLLVM.cpp in cmake targets
Branches
Unknown
Tags
Unknown