Module Name:    src
Committed By:   andvar
Date:           Sun Oct  1 19:28:36 UTC 2023

Modified Files:
        src/sys/arch/news68k/conf: files.news68k
        src/sys/arch/news68k/news68k: trap.c

Log Message:
Improve KGDB enabled build for news68k:
* include sys/kgdb.h in news68k/trap.c for missing definitions.
* cast second kgdb_trap argument to (db_regs_t *).
* build m68k/kgdb_machdep.c for kgdb_trap() implementation.

Same as for mvme68k, build complains about undefined reference to zs_check_kgdb
due to missing port specific zs kgdb implementation for MI zs(4) driver though.


To generate a diff of this commit:
cvs rdiff -u -r1.35 -r1.36 src/sys/arch/news68k/conf/files.news68k
cvs rdiff -u -r1.74 -r1.75 src/sys/arch/news68k/news68k/trap.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/news68k/conf/files.news68k
diff -u src/sys/arch/news68k/conf/files.news68k:1.35 src/sys/arch/news68k/conf/files.news68k:1.36
--- src/sys/arch/news68k/conf/files.news68k:1.35	Mon Feb 18 01:12:24 2019
+++ src/sys/arch/news68k/conf/files.news68k	Sun Oct  1 19:28:36 2023
@@ -1,4 +1,4 @@
-#	$NetBSD: files.news68k,v 1.35 2019/02/18 01:12:24 thorpej Exp $
+#	$NetBSD: files.news68k,v 1.36 2023/10/01 19:28:36 andvar Exp $
 
 #	NEWS68K-specific configuration info
 
@@ -23,6 +23,7 @@ file	arch/news68k/news68k/romcalls.S
 file	arch/news68k/news68k/trap.c
 file	arch/m68k/m68k/cacheops.c
 file	arch/m68k/m68k/db_memrw.c		ddb | kgdb
+file	arch/m68k/m68k/kgdb_machdep.c		kgdb
 file	arch/m68k/m68k/m68k_trap.c
 file	arch/m68k/m68k/pmap_motorola.c
 file	arch/m68k/m68k/procfs_machdep.c		procfs

Index: src/sys/arch/news68k/news68k/trap.c
diff -u src/sys/arch/news68k/news68k/trap.c:1.74 src/sys/arch/news68k/news68k/trap.c:1.75
--- src/sys/arch/news68k/news68k/trap.c:1.74	Sat Apr 22 10:09:12 2023
+++ src/sys/arch/news68k/news68k/trap.c	Sun Oct  1 19:28:36 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: trap.c,v 1.74 2023/04/22 10:09:12 tsutsui Exp $	*/
+/*	$NetBSD: trap.c,v 1.75 2023/10/01 19:28:36 andvar Exp $	*/
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -39,7 +39,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.74 2023/04/22 10:09:12 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.75 2023/10/01 19:28:36 andvar Exp $");
 
 #include "opt_ddb.h"
 #include "opt_execfmt.h"
@@ -54,6 +54,7 @@ __KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.7
 #include <sys/syscall.h>
 #include <sys/userret.h>
 #include <sys/kauth.h>
+#include <sys/kgdb.h>
 
 #include <m68k/frame.h>
 #include <m68k/cacheops.h>
@@ -281,7 +282,7 @@ trap(struct frame *fp, int type, u_int c
 		s = splhigh();
 #ifdef KGDB
 		/* If connected, step or cont returns 1 */
-		if (kgdb_trap(type, fp))
+		if (kgdb_trap(type, (db_regs_t *)fp))
 			goto kgdb_cont;
 #endif
 #ifdef DDB

Reply via email to