return 1;
}
+/* Implementation of the linux_target_ops method "validate_tdesc ". */
+
+static bool
+aarch64_validate_tdesc (struct thread_info *thread)
+{
+ return true;
+}
+
struct linux_target_ops the_low_target =
{
aarch64_arch_setup,
aarch64_breakpoint_kind_from_current_state,
aarch64_supports_hardware_single_step,
aarch64_get_syscall_trapinfo,
+ NULL, /* get_ipa_tdesc_idx. */
+ aarch64_validate_tdesc,
};
void
return (*the_low_target.get_ipa_tdesc_idx) ();
}
+static bool
+linux_validate_tdesc (struct thread_info *thread)
+{
+ if (the_low_target.validate_tdesc == NULL)
+ return true;
+
+ return (*the_low_target.validate_tdesc) (thread);
+}
+
static int
linux_supports_tracepoints (void)
{
#else
NULL,
#endif
+ linux_arch_setup,
+ linux_validate_tdesc,
};
#ifdef HAVE_LINUX_REGSETS
false for failure. Return pointer to thread handle via HANDLE
and the handle's length via HANDLE_LEN. */
bool (*thread_handle) (ptid_t ptid, gdb_byte **handle, int *handle_len);
+
+ /* Call the target arch_setup function on the current thread. */
+ void (*arch_setup) (void);
+
+ /* Check that the current target description is still valid for the current
+ inferior, returning false if not. For example, if the size of some
+ registers (see aarch64 SVE), or the number of registers, had changed.
+ This check does not include the contents of the registers. Default
+ implementation will always return true. */
+ bool (*validate_tdesc) (struct thread_info *thread);
};
extern struct target_ops *the_target;
(the_target->get_min_fast_tracepoint_insn_len \
? (*the_target->get_min_fast_tracepoint_insn_len) () : 0)
+#define target_arch_setup(thread) \
+ if (the_target->arch_setup) \
+ (*the_target->arch_setup) ();
+
+#define target_validate_tdesc(thread) \
+ (the_target->validate_tdesc \
+ ? (*the_target->validate_tdesc) (thread) : true)
+
#define thread_stopped(thread) \
(*the_target->thread_stopped) (thread)