Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys rename the MD Debugger() to cpu_Debugger()



details:   https://anonhg.NetBSD.org/src/rev/b246a4a916d3
branches:  trunk
changeset: 477147:b246a4a916d3
user:      jdolecek <jdolecek%NetBSD.org@localhost>
date:      Tue Oct 12 17:08:56 1999 +0000

description:
rename the MD Debugger() to cpu_Debugger()
add MI Debugger() which switches to console if wscons is used prior
to calling cpu_Debugger()

diffstat:

 sys/arch/alpha/alpha/db_interface.c     |   6 +-
 sys/arch/arm32/arm32/db_interface.c     |   4 +-
 sys/arch/i386/i386/db_interface.c       |   4 +-
 sys/arch/m68k/m68k/db_interface.c       |   4 +-
 sys/arch/mips/mips/db_interface.c       |   4 +-
 sys/arch/powerpc/powerpc/db_interface.c |   4 +-
 sys/arch/sparc/sparc/db_interface.c     |   4 +-
 sys/arch/sparc64/sparc64/db_interface.c |   4 +-
 sys/conf/files                          |   3 +-
 sys/ddb/db_debugger.c                   |  59 +++++++++++++++++++++++++++++++++
 sys/sys/systm.h                         |   3 +-
 11 files changed, 80 insertions(+), 19 deletions(-)

diffs (250 lines):

diff -r 398640a79064 -r b246a4a916d3 sys/arch/alpha/alpha/db_interface.c
--- a/sys/arch/alpha/alpha/db_interface.c       Tue Oct 12 16:47:41 1999 +0000
+++ b/sys/arch/alpha/alpha/db_interface.c       Tue Oct 12 17:08:56 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: db_interface.c,v 1.7 1999/05/09 19:39:13 cgd Exp $ */
+/* $NetBSD: db_interface.c,v 1.8 1999/10/12 17:08:57 jdolecek Exp $ */
 
 /* 
  * Mach Operating System
@@ -51,7 +51,7 @@
 
 #include <sys/cdefs.h>                 /* RCS ID & Copyright macro defns */
 
-__KERNEL_RCSID(0, "$NetBSD: db_interface.c,v 1.7 1999/05/09 19:39:13 cgd Exp $");
+__KERNEL_RCSID(0, "$NetBSD: db_interface.c,v 1.8 1999/10/12 17:08:57 jdolecek Exp $");
 
 #include <sys/param.h>
 #include <sys/proc.h>
@@ -219,7 +219,7 @@
 }
 
 void
-Debugger()
+cpu_Debugger()
 {
 
        __asm __volatile("call_pal 0x81");              /* bugchk */
diff -r 398640a79064 -r b246a4a916d3 sys/arch/arm32/arm32/db_interface.c
--- a/sys/arch/arm32/arm32/db_interface.c       Tue Oct 12 16:47:41 1999 +0000
+++ b/sys/arch/arm32/arm32/db_interface.c       Tue Oct 12 17:08:56 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: db_interface.c,v 1.28 1999/04/12 20:38:18 pk Exp $     */
+/*     $NetBSD: db_interface.c,v 1.29 1999/10/12 17:08:57 jdolecek Exp $       */
 
 /* 
  * Copyright (c) 1996 Scott K. Stevens
@@ -295,7 +295,7 @@
 }
 
 void
-Debugger()
+cpu_Debugger()
 {
        asm(".word      0xe7ffffff");
 }
diff -r 398640a79064 -r b246a4a916d3 sys/arch/i386/i386/db_interface.c
--- a/sys/arch/i386/i386/db_interface.c Tue Oct 12 16:47:41 1999 +0000
+++ b/sys/arch/i386/i386/db_interface.c Tue Oct 12 17:08:56 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: db_interface.c,v 1.26 1999/04/12 20:38:18 pk Exp $     */
+/*     $NetBSD: db_interface.c,v 1.27 1999/10/12 17:08:58 jdolecek Exp $       */
 
 /* 
  * Mach Operating System
@@ -144,7 +144,7 @@
 }
 
 void
-Debugger()
+cpu_Debugger()
 {
        breakpoint();
 }
diff -r 398640a79064 -r b246a4a916d3 sys/arch/m68k/m68k/db_interface.c
--- a/sys/arch/m68k/m68k/db_interface.c Tue Oct 12 16:47:41 1999 +0000
+++ b/sys/arch/m68k/m68k/db_interface.c Tue Oct 12 17:08:56 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: db_interface.c,v 1.25 1998/07/04 22:18:27 jonathan Exp $       */
+/*     $NetBSD: db_interface.c,v 1.26 1999/10/12 17:08:58 jdolecek Exp $       */
 
 /* 
  * Mach Operating System
@@ -150,7 +150,7 @@
 }
 
 void
-Debugger()
+cpu_Debugger()
 {
        asm ("trap #15");
 }
diff -r 398640a79064 -r b246a4a916d3 sys/arch/mips/mips/db_interface.c
--- a/sys/arch/mips/mips/db_interface.c Tue Oct 12 16:47:41 1999 +0000
+++ b/sys/arch/mips/mips/db_interface.c Tue Oct 12 17:08:56 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: db_interface.c,v 1.19 1999/10/11 05:11:02 shin Exp $   */
+/*     $NetBSD: db_interface.c,v 1.20 1999/10/12 17:08:58 jdolecek Exp $       */
 
 /*
  * Mach Operating System
@@ -185,7 +185,7 @@
 }
 
 void
-Debugger()
+cpu_Debugger()
 {
        asm("break");
 }
diff -r 398640a79064 -r b246a4a916d3 sys/arch/powerpc/powerpc/db_interface.c
--- a/sys/arch/powerpc/powerpc/db_interface.c   Tue Oct 12 16:47:41 1999 +0000
+++ b/sys/arch/powerpc/powerpc/db_interface.c   Tue Oct 12 17:08:56 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: db_interface.c,v 1.4 1998/08/31 14:43:40 tsubai Exp $ */
+/*     $NetBSD: db_interface.c,v 1.5 1999/10/12 17:08:58 jdolecek Exp $ */
 /*     $OpenBSD: db_interface.c,v 1.2 1996/12/28 06:21:50 rahnds Exp $ */
 
 #include "opt_ddb.h"
@@ -11,7 +11,7 @@
 #include <machine/db_machdep.h>
 
 void
-Debugger()
+cpu_Debugger()
 {
        ddb_trap();
 }
diff -r 398640a79064 -r b246a4a916d3 sys/arch/sparc/sparc/db_interface.c
--- a/sys/arch/sparc/sparc/db_interface.c       Tue Oct 12 16:47:41 1999 +0000
+++ b/sys/arch/sparc/sparc/db_interface.c       Tue Oct 12 17:08:56 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: db_interface.c,v 1.29 1999/04/12 20:38:20 pk Exp $ */
+/*     $NetBSD: db_interface.c,v 1.30 1999/10/12 17:08:59 jdolecek Exp $ */
 
 /*
  * Mach Operating System
@@ -108,7 +108,7 @@
  * Data and functions used by DDB only.
  */
 void
-Debugger()
+cpu_Debugger()
 {
        asm("ta 0x81");
 }
diff -r 398640a79064 -r b246a4a916d3 sys/arch/sparc64/sparc64/db_interface.c
--- a/sys/arch/sparc64/sparc64/db_interface.c   Tue Oct 12 16:47:41 1999 +0000
+++ b/sys/arch/sparc64/sparc64/db_interface.c   Tue Oct 12 17:08:56 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: db_interface.c,v 1.21 1999/07/22 21:12:19 thorpej Exp $ */
+/*     $NetBSD: db_interface.c,v 1.22 1999/10/12 17:08:59 jdolecek Exp $ */
 
 /*
  * Mach Operating System
@@ -294,7 +294,7 @@
 }
 
 void
-Debugger()
+cpu_Debugger()
 {
        /* We use the breakpoint to trap into DDB */
        asm("ta 1; nop");
diff -r 398640a79064 -r b246a4a916d3 sys/conf/files
--- a/sys/conf/files    Tue Oct 12 16:47:41 1999 +0000
+++ b/sys/conf/files    Tue Oct 12 17:08:56 1999 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: files,v 1.320 1999/10/11 16:15:13 jdolecek Exp $
+#      $NetBSD: files,v 1.321 1999/10/12 17:08:56 jdolecek Exp $
 
 #      @(#)files.newconf       7.5 (Berkeley) 5/10/93
 
@@ -457,6 +457,7 @@
 file ddb/db_aout.c                     ddb
 file ddb/db_break.c                    ddb
 file ddb/db_command.c                  ddb
+file ddb/db_debugger.c                 ddb
 file ddb/db_elf.c                      ddb
 file ddb/db_examine.c                  ddb
 file ddb/db_expr.c                     ddb
diff -r 398640a79064 -r b246a4a916d3 sys/ddb/db_debugger.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/ddb/db_debugger.c     Tue Oct 12 17:08:56 1999 +0000
@@ -0,0 +1,59 @@
+/*     $NetBSD: db_debugger.c,v 1.1 1999/10/12 17:08:57 jdolecek Exp $ */
+
+/*-
+ * Copyright (c) 1996, 1997 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to The NetBSD Foundation
+ * by Jaromir Dolecek.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ *    must display the following acknowledgement:
+ *     This product includes software developed by the NetBSD
+ *     Foundation, Inc. and its contributors.
+ * 4. Neither the name of The NetBSD Foundation nor the names of its
+ *    contributors may be used to endorse or promote products derived
+ *    from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "wsdisplay.h"
+#include "opt_ddb.h"
+
+#include <sys/types.h>
+#include <sys/systm.h>
+
+#if defined(NWSDISPLAY) && NWSDISPLAY > 0
+#include <dev/wscons/wsdisplayvar.h>
+#endif
+
+void
+Debugger()
+{
+#if defined(NWSDISPLAY) && NWSDISPLAY > 0
+       /* if wscons is used, switch to console before entering DDB */
+       wsdisplay_switchtoconsole();
+#endif
+
+       /* now just call the MD hook to switch into DDB */
+       cpu_Debugger();
+}
diff -r 398640a79064 -r b246a4a916d3 sys/sys/systm.h
--- a/sys/sys/systm.h   Tue Oct 12 16:47:41 1999 +0000
+++ b/sys/sys/systm.h   Tue Oct 12 17:08:56 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: systm.h,v 1.95 1999/09/15 19:35:53 thorpej Exp $       */
+/*     $NetBSD: systm.h,v 1.96 1999/10/12 17:08:57 jdolecek Exp $      */
 
 /*-
  * Copyright (c) 1982, 1988, 1991, 1993
@@ -308,6 +308,7 @@
 #ifdef _KERNEL
 #ifdef DDB
 void   Debugger __P((void));
+void   cpu_Debugger __P((void));
 /*
  * Enter debugger(s) from console attention if enabled
  */



Home | Main Index | Thread Index | Old Index