+/* SPDX-License-Identifier: GPL-2.0 */
/******************************************************************************
* asm/debugger.h
*
#ifndef __X86_DEBUGGER_H__
#define __X86_DEBUGGER_H__
-#include <xen/sched.h>
-#include <asm/regs.h>
-#include <asm/processor.h>
-
#ifdef CONFIG_CRASH_DEBUG
#include <xen/gdbstub.h>
+#include <xen/stdbool.h>
+
+#include <asm/x86-defns.h>
+/* Returns true if GDB handled the trap, or it is surviveable. */
static inline bool debugger_trap_fatal(
unsigned int vector, struct cpu_user_regs *regs)
{
int rc = __trap_to_gdb(regs, vector);
- return ((rc == 0) || (vector == TRAP_int3));
+
+ if ( rc == 0 )
+ return true;
+
+ return vector == X86_EXC_BP;
}
/* Int3 is a trivial way to gather cpu_user_regs context. */
-#define debugger_trap_immediate() __asm__ __volatile__ ( "int3" );
+#define debugger_trap_immediate() __asm__ __volatile__ ( "int3" )
#else
#include <xen/xenoprof.h>
#include <xen/irq.h>
#include <xen/argo.h>
-#include <asm/debugger.h>
#include <asm/p2m.h>
#include <asm/processor.h>
#include <public/sched.h>