diff --git a/sys/ia64/ia64/machdep.c b/sys/ia64/ia64/machdep.c
index 92bbc64cbfab..ad4270b64dec 100644
--- a/sys/ia64/ia64/machdep.c
+++ b/sys/ia64/ia64/machdep.c
@@ -86,6 +86,7 @@ __FBSDID("$FreeBSD$");
 #include <machine/elf.h>
 #include <machine/fpu.h>
 #include <machine/intr.h>
+#include <machine/kdb.h>
 #include <machine/mca.h>
 #include <machine/md_var.h>
 #include <machine/pal.h>
@@ -561,6 +562,18 @@ spinlock_exit(void)
 		intr_restore(intr);
 }
 
+void
+kdb_cpu_trap(int vector, int code __unused)
+{
+
+	__asm __volatile("flushrs;;");
+
+	/* Restart after the break instruction. */
+	if (vector == IA64_VEC_BREAK &&
+	    kdb_frame->tf_special.ifa == IA64_FIXED_BREAK)
+		kdb_frame->tf_special.psr += IA64_PSR_RI_1;
+}
+
 void
 map_vhpt(uintptr_t vhpt)
 {
diff --git a/sys/ia64/include/kdb.h b/sys/ia64/include/kdb.h
index 8a9cc3a1e3b3..0304f510f919 100644
--- a/sys/ia64/include/kdb.h
+++ b/sys/ia64/include/kdb.h
@@ -35,6 +35,8 @@
 
 #define	KDB_STOPPEDPCB(pc)	(&(pc)->pc_md.pcb)
 
+void kdb_cpu_trap(int, int);
+
 static __inline void
 kdb_cpu_clear_singlestep(void)
 {
@@ -62,14 +64,4 @@ kdb_cpu_sync_icache(unsigned char *addr, size_t size)
 	}
 }
 
-static __inline void
-kdb_cpu_trap(int vector, int _)
-{
-	__asm __volatile("flushrs;;");
-
-	if (vector == IA64_VEC_BREAK &&
-	    kdb_frame->tf_special.ifa == IA64_FIXED_BREAK)
-                kdb_frame->tf_special.psr += IA64_PSR_RI_1;
-}
-
 #endif /* _MACHINE_KDB_H_ */