Module Name: src
Committed By: andvar
Date: Tue Oct 24 18:08:16 UTC 2023
Modified Files:
src/sys/arch/mips/mips: trap.c
Log Message:
pass &tf->tf_registers instead of tf to db_set_ddb_regs().
use _R_PC definition instead of TF_EPC for tf->tf_regs[].
Changes were not adjusted with mips64 merge for kgdb code.
makes trap.c build with KGDB option enabled for mips archs.
To generate a diff of this commit:
cvs rdiff -u -r1.264 -r1.265 src/sys/arch/mips/mips/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/mips/mips/trap.c
diff -u src/sys/arch/mips/mips/trap.c:1.264 src/sys/arch/mips/mips/trap.c:1.265
--- src/sys/arch/mips/mips/trap.c:1.264 Thu Oct 5 19:41:04 2023
+++ src/sys/arch/mips/mips/trap.c Tue Oct 24 18:08:16 2023
@@ -1,4 +1,4 @@
-/* $NetBSD: trap.c,v 1.264 2023/10/05 19:41:04 ad Exp $ */
+/* $NetBSD: trap.c,v 1.265 2023/10/24 18:08:16 andvar Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@@ -39,7 +39,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.264 2023/10/05 19:41:04 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.265 2023/10/24 18:08:16 andvar Exp $");
#include "opt_cputype.h" /* which mips CPU levels do we support? */
#include "opt_ddb.h"
@@ -282,10 +282,10 @@ trap(uint32_t status, uint32_t cause, va
* that db_machdep.h macros will work with it, and
* allow gdb to alter the PC.
*/
- db_set_ddb_regs(type, tf);
+ db_set_ddb_regs(type, &tf->tf_registers);
PC_BREAK_ADVANCE(regs);
if (kgdb_trap(type, regs)) {
- tf->tf_regs[TF_EPC] = regs->r_regs[_R_PC];
+ tf->tf_regs[_R_PC] = regs->r_regs[_R_PC];
return;
}
}