Avoid "text file busy" in dw2-using-debug-str.exp
[binutils-gdb.git] / gdb / arch / aarch64-mte-linux.h
blobf9337294e6080a34c7735c3ed5c5167ce7ff4c0d
1 /* Common Linux target-dependent definitions for AArch64 MTE
3 Copyright (C) 2021-2024 Free Software Foundation, Inc.
5 This file is part of GDB.
7 This program is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 3 of the License, or
10 (at your option) any later version.
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with this program. If not, see <http://www.gnu.org/licenses/>. */
20 #ifndef GDB_ARCH_AARCH64_MTE_LINUX_H
21 #define GDB_ARCH_AARCH64_MTE_LINUX_H
24 /* Feature check for Memory Tagging Extension. */
25 #ifndef HWCAP2_MTE
26 #define HWCAP2_MTE (1 << 18)
27 #endif
29 /* The MTE regset consists of a single 64-bit register. */
30 #define AARCH64_LINUX_SIZEOF_MTE 8
32 /* Memory tagging definitions. */
33 #ifndef SEGV_MTEAERR
34 # define SEGV_MTEAERR 8
35 # define SEGV_MTESERR 9
36 #endif
38 /* Memory tag types for AArch64. */
39 enum class aarch64_memtag_type
41 /* MTE logical tag contained in pointers. */
42 mte_logical = 0,
43 /* MTE allocation tag stored in memory tag granules. */
44 mte_allocation
47 /* Given a TAGS vector containing 1 MTE tag per byte, pack the data as
48 2 tags per byte and resize the vector. */
49 extern void aarch64_mte_pack_tags (gdb::byte_vector &tags);
51 /* Given a TAGS vector containing 2 MTE tags per byte, unpack the data as
52 1 tag per byte and resize the vector. If SKIP_FIRST is TRUE, skip the
53 first unpacked element. Otherwise leave it in the unpacked vector. */
54 extern void aarch64_mte_unpack_tags (gdb::byte_vector &tags, bool skip_first);
56 #endif /* GDB_ARCH_AARCH64_MTE_LINUX_H */