Module Name:    src
Committed By:   simonb
Date:           Mon Mar 29 03:09:42 UTC 2021

Modified Files:
        src/sys/arch/mips/include: db_machdep.h
        src/sys/arch/mips/mips: mips_stacktrace.c

Log Message:
Expose kdbpeek() and kdbrpeek() for dtrace.


To generate a diff of this commit:
cvs rdiff -u -r1.36 -r1.37 src/sys/arch/mips/include/db_machdep.h
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/mips/mips/mips_stacktrace.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/include/db_machdep.h
diff -u src/sys/arch/mips/include/db_machdep.h:1.36 src/sys/arch/mips/include/db_machdep.h:1.37
--- src/sys/arch/mips/include/db_machdep.h:1.36	Mon Mar 29 03:07:33 2021
+++ src/sys/arch/mips/include/db_machdep.h	Mon Mar 29 03:09:41 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: db_machdep.h,v 1.36 2021/03/29 03:07:33 simonb Exp $ */
+/* $NetBSD: db_machdep.h,v 1.37 2021/03/29 03:09:41 simonb Exp $ */
 
 /*
  * Copyright (c) 1997 Jonathan Stone (hereinafter referred to as the author)
@@ -99,6 +99,12 @@ db_set_ddb_regs(int type, struct reg *re
 	ddb_regs = *regs;
 }
 
+/*
+ * Helper functions for fetching 32-bit and 64-bit kernel memory.
+ */
+bool		kdbpeek(vaddr_t, unsigned *);
+mips_reg_t	kdbrpeek(vaddr_t addr, size_t n);
+
 
 /*
  * Constants for KGDB.

Index: src/sys/arch/mips/mips/mips_stacktrace.c
diff -u src/sys/arch/mips/mips/mips_stacktrace.c:1.7 src/sys/arch/mips/mips/mips_stacktrace.c:1.8
--- src/sys/arch/mips/mips/mips_stacktrace.c:1.7	Thu Sep 24 03:17:18 2020
+++ src/sys/arch/mips/mips/mips_stacktrace.c	Mon Mar 29 03:09:42 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: mips_stacktrace.c,v 1.7 2020/09/24 03:17:18 mrg Exp $	*/
+/*	$NetBSD: mips_stacktrace.c,v 1.8 2021/03/29 03:09:42 simonb Exp $	*/
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -40,7 +40,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: mips_stacktrace.c,v 1.7 2020/09/24 03:17:18 mrg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mips_stacktrace.c,v 1.8 2021/03/29 03:09:42 simonb Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_ddb.h"
@@ -191,7 +191,7 @@ static const struct { void *addr; const 
 };
 
 
-static bool
+bool
 kdbpeek(vaddr_t addr, unsigned *valp)
 {
 	if (addr & 3) {
@@ -211,7 +211,7 @@ kdbpeek(vaddr_t addr, unsigned *valp)
 	}
 }
 
-static mips_reg_t
+mips_reg_t
 kdbrpeek(vaddr_t addr, size_t n)
 {
 	mips_reg_t rc = 0;

Reply via email to