+++ /dev/null
-#ifndef __ARM_DEBUGGER_H__
-#define __ARM_DEBUGGER_H__
-
-#define debugger_trap_fatal(v, r) (0)
-#define debugger_trap_immediate() ((void) 0)
-
-#endif /* __ARM_DEBUGGER_H__ */
-/*
- * Local variables:
- * mode: C
- * c-file-style: "BSD"
- * c-basic-offset: 4
- * indent-tabs-mode: nil
- * End:
- */
/* SPDX-License-Identifier: GPL-2.0 */
/******************************************************************************
- * asm/debugger.h
- *
- * Generic hooks into arch-dependent Xen.
- *
- * Each debugger should define two functions here:
- *
- * debugger_trap_fatal():
- * Called when Xen is about to give up and crash. Typically you will use this
- * hook to drop into a debug session. It can also be used to hook off
- * deliberately caused traps (which you then handle and return non-zero).
+ * xen/arch/x86/include/asm/debugger.h
*
- * debugger_trap_immediate():
- * Called if we want to drop into a debugger now. This is essentially the
- * same as debugger_trap_fatal, except that we use the current register state
- * rather than the state which was in effect when we took the trap.
- * For example: if we're dying because of an unhandled exception, we call
- * debugger_trap_fatal; if we're dying because of a panic() we call
- * debugger_trap_immediate().
+ * x86-specific debugger hooks.
*/
-
#ifndef __X86_DEBUGGER_H__
#define __X86_DEBUGGER_H__
-#ifdef CONFIG_CRASH_DEBUG
-
#include <xen/gdbstub.h>
#include <xen/stdbool.h>
/* Int3 is a trivial way to gather cpu_user_regs context. */
#define debugger_trap_immediate() __asm__ __volatile__ ( "int3" )
-#else
-
-static inline bool debugger_trap_fatal(
- unsigned int vector, struct cpu_user_regs *regs)
-{
- return false;
-}
-
-#define debugger_trap_immediate() ((void)0)
-
-#endif
-
#endif /* __X86_DEBUGGER_H__ */
#include <xen/shutdown.h>
#include <xen/guest_access.h>
#include <asm/regs.h>
+#include <xen/debugger.h>
#include <xen/delay.h>
#include <xen/event.h>
#include <xen/spinlock.h>
#include <asm/uaccess.h>
#include <asm/i387.h>
#include <asm/xstate.h>
-#include <asm/debugger.h>
#include <asm/msr.h>
#include <asm/nmi.h>
#include <asm/xenoprof.h>
*/
#include <asm/regs.h>
+#include <xen/debugger.h>
#include <xen/delay.h>
#include <xen/keyhandler.h>
#include <xen/param.h>
#include <xen/mm.h>
#include <xen/watchdog.h>
#include <xen/init.h>
-#include <asm/debugger.h>
#include <asm/div64.h>
static unsigned char keypress_key;
#include <xen/lib.h>
#include <xen/param.h>
#include <xen/sched.h>
+#include <xen/debugger.h>
#include <xen/domain.h>
#include <xen/delay.h>
#include <xen/watchdog.h>
#include <xen/shutdown.h>
#include <xen/console.h>
#include <xen/kexec.h>
-#include <asm/debugger.h>
#include <public/sched.h>
/* opt_noreboot: If true, machine will need manual reset on error. */
#include <xen/init.h>
#include <xen/event.h>
#include <xen/console.h>
+#include <xen/debugger.h>
#include <xen/param.h>
#include <xen/serial.h>
#include <xen/softirq.h>
#include <xen/kexec.h>
#include <xen/ctype.h>
#include <xen/warning.h>
-#include <asm/debugger.h>
#include <asm/div64.h>
#include <xen/hypercall.h> /* for do_console_io */
#include <xen/early_printk.h>
--- /dev/null
+/* SPDX-License-Identifier: GPL-2.0 */
+/******************************************************************************
+ * Arch specific debuggers should implement:
+ *
+ * debugger_trap_fatal():
+ * Called when Xen is about to give up and crash. Typically you will use this
+ * hook to drop into a debug session. It can also be used to hook off
+ * deliberately caused traps (which you then handle and return non-zero).
+ *
+ * debugger_trap_immediate():
+ * Called if we want to drop into a debugger now. This is essentially the
+ * same as debugger_trap_fatal, except that we use the current register state
+ * rather than the state which was in effect when we took the trap.
+ * For example: if we're dying because of an unhandled exception, we call
+ * debugger_trap_fatal; if we're dying because of a panic() we call
+ * debugger_trap_immediate().
+ */
+
+#ifndef __XEN_DEBUGGER_H__
+#define __XEN_DEBUGGER_H__
+
+#ifdef CONFIG_CRASH_DEBUG
+
+#include <asm/debugger.h>
+
+#else
+
+#include <xen/stdbool.h>
+
+struct cpu_user_regs;
+
+static inline bool debugger_trap_fatal(
+ unsigned int vector, const struct cpu_user_regs *regs)
+{
+ return false;
+}
+
+static inline void debugger_trap_immediate(void)
+{
+}
+
+#endif /* CONFIG_CRASH_DEBUG */
+
+#endif /* __XEN_DEBUGGER_H__ */