Support AArch64/Linux watchpoint on tagged addresses
authorMuhammad Omair Javaid <omair.javaid@linaro.org>
Mon, 12 Jul 2021 02:06:34 +0000 (07:06 +0500)
committerMuhammad Omair Javaid <omair.javaid@linaro.org>
Mon, 12 Jul 2021 02:39:26 +0000 (07:39 +0500)
commit5e6aabd48e351cf2632c25cb8bdfd0598a5019a6
tree6daae2166a77d7878068362dcd5b3213d6864c8c
parent6ebeb7f8baf3feb6657c4e9c523fe61eca2dc43d
Support AArch64/Linux watchpoint on tagged addresses

AArch64 architecture support virtual addresses with some of the top bits ignored.
These ignored bits can host memory tags or bit masks that can serve to check for
authentication of address integrity. We need to clear away the top ignored bits
from watchpoint address to reliably hit and set watchpoints on addresses
containing tags or masks in their top bits.

This patch adds support to watch tagged addresses on AArch64/Linux.

Reviewed By: DavidSpickett

Differential Revision: https://reviews.llvm.org/D101361
lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64.cpp
lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64.h
lldb/source/Plugins/Process/Utility/NativeRegisterContextDBReg_arm64.cpp
lldb/source/Plugins/Process/Utility/NativeRegisterContextDBReg_arm64.h
lldb/source/Target/Target.cpp
lldb/test/API/commands/watchpoints/watch_tagged_addr/Makefile [new file with mode: 0644]
lldb/test/API/commands/watchpoints/watch_tagged_addr/TestWatchTaggedAddress.py [new file with mode: 0644]
lldb/test/API/commands/watchpoints/watch_tagged_addr/main.c [new file with mode: 0644]