-static int
-aarch64_supports_hardware_single_step (void)
-{
- return 1;
-}
-
-struct linux_target_ops the_low_target =
-{
- aarch64_supports_z_point_type,
- aarch64_insert_point,
- aarch64_remove_point,
- aarch64_stopped_by_watchpoint,
- aarch64_stopped_data_address,
- NULL, /* collect_ptrace_register */
- NULL, /* supply_ptrace_register */
- aarch64_linux_siginfo_fixup,
- aarch64_linux_new_process,
- aarch64_linux_delete_process,
- aarch64_linux_new_thread,
- aarch64_linux_delete_thread,
- aarch64_linux_new_fork,
- aarch64_linux_prepare_to_resume,
- NULL, /* process_qsupported */
- aarch64_supports_tracepoints,
- aarch64_get_thread_area,
- aarch64_install_fast_tracepoint_jump_pad,
- aarch64_emit_ops,
- aarch64_get_min_fast_tracepoint_insn_len,
- aarch64_supports_range_stepping,
- aarch64_supports_hardware_single_step,
- aarch64_get_syscall_trapinfo,
-};
+ return (linux_get_hwcap2 (8) & HWCAP2_MTE) != 0;
+}
+
+bool
+aarch64_target::fetch_memtags (CORE_ADDR address, size_t len,
+ gdb::byte_vector &tags, int type)
+{
+ /* Allocation tags are per-process, so any tid is fine. */
+ int tid = lwpid_of (current_thread);
+
+ /* Allocation tag? */
+ if (type == static_cast <int> (aarch64_memtag_type::mte_allocation))
+ return aarch64_mte_fetch_memtags (tid, address, len, tags);
+
+ return false;
+}
+
+bool
+aarch64_target::store_memtags (CORE_ADDR address, size_t len,
+ const gdb::byte_vector &tags, int type)
+{
+ /* Allocation tags are per-process, so any tid is fine. */
+ int tid = lwpid_of (current_thread);
+
+ /* Allocation tag? */
+ if (type == static_cast <int> (aarch64_memtag_type::mte_allocation))
+ return aarch64_mte_store_memtags (tid, address, len, tags);
+
+ return false;
+}