Source-Changes-HG archive

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

[src/trunk]: src/sys/arch Move db_disasm.c into sys/arch/arm/arm. Use arm26 ...



details:   https://anonhg.NetBSD.org/src/rev/6f4c491ff9cd
branches:  trunk
changeset: 502162:6f4c491ff9cd
user:      bjh21 <bjh21%NetBSD.org@localhost>
date:      Fri Jan 12 21:31:51 2001 +0000

description:
Move db_disasm.c into sys/arch/arm/arm.  Use arm26 version, since it should
generate smaller compiled code.

diffstat:

 sys/arch/arm/arm/db_disasm.c     |  76 ++++++++++++++++++++++++++++++++++++++++
 sys/arch/arm/conf/files.arm      |   5 ++-
 sys/arch/arm26/arm26/db_disasm.c |  76 ----------------------------------------
 sys/arch/arm26/conf/files.arm26  |   3 +-
 sys/arch/arm32/arm32/db_disasm.c |  75 ---------------------------------------
 sys/arch/arm32/conf/files.arm32  |   3 +-
 6 files changed, 82 insertions(+), 156 deletions(-)

diffs (289 lines):

diff -r 2d716d1d96a9 -r 6f4c491ff9cd sys/arch/arm/arm/db_disasm.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/arch/arm/arm/db_disasm.c      Fri Jan 12 21:31:51 2001 +0000
@@ -0,0 +1,76 @@
+/*     $NetBSD: db_disasm.c,v 1.1 2001/01/12 21:31:51 bjh21 Exp $      */
+
+/*
+ * Copyright (c) 1996 Mark Brinicombe.
+ * Copyright (c) 1996 Brini.
+ *
+ * All rights reserved.
+ *
+ * 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 Brini.
+ * 4. The name of the company nor the name of the author may be used to
+ *    endorse or promote products derived from this software without specific
+ *    prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY BRINI ``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 BRINI 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 <sys/param.h>
+#include <machine/db_machdep.h>
+#include <ddb/db_interface.h>
+#include <ddb/db_sym.h>
+#include <ddb/db_output.h>
+#include <ddb/db_access.h>
+
+#include <arch/arm/arm/disassem.h>
+
+/* Glue code to interface db_disasm to the generic ARM disassembler */
+
+static u_int db_disasm_read_word(u_int);
+static void db_disasm_printaddr(u_int);
+
+static disasm_interface_t db_disasm_interface = {
+       db_disasm_read_word, db_disasm_printaddr, db_printf
+};
+
+static u_int
+db_disasm_read_word(u_int address)
+{
+
+       return db_get_value(address, 4, 0);
+}
+
+static void
+db_disasm_printaddr(u_int address)
+{
+
+       db_printsym((db_addr_t)address, DB_STGY_ANY, db_printf);
+}
+
+vm_offset_t
+db_disasm(vm_offset_t loc, boolean_t altfmt)
+{
+
+       return disasm(&db_disasm_interface, loc, altfmt);
+}
+
+/* End of db_disasm.c */
diff -r 2d716d1d96a9 -r 6f4c491ff9cd sys/arch/arm/conf/files.arm
--- a/sys/arch/arm/conf/files.arm       Fri Jan 12 19:41:13 2001 +0000
+++ b/sys/arch/arm/conf/files.arm       Fri Jan 12 21:31:51 2001 +0000
@@ -1,8 +1,11 @@
-#      $NetBSD: files.arm,v 1.3 2001/01/12 13:43:12 bjh21 Exp $
+#      $NetBSD: files.arm,v 1.4 2001/01/12 21:31:52 bjh21 Exp $
 
 file   arch/arm/arm/in_cksum_arm.c             inet
 file   netinet/in4_cksum.c                     inet
 file   netns/ns_cksum.c                        ns
 
+# DDB
+file   arch/arm/arm/db_disasm.c                ddb
+
 # files related to debugging
 file   arch/arm/arm/disassem.c
diff -r 2d716d1d96a9 -r 6f4c491ff9cd sys/arch/arm26/arm26/db_disasm.c
--- a/sys/arch/arm26/arm26/db_disasm.c  Fri Jan 12 19:41:13 2001 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,76 +0,0 @@
-/*     $NetBSD: db_disasm.c,v 1.4 2001/01/12 13:43:12 bjh21 Exp $      */
-
-/*
- * Copyright (c) 1996 Mark Brinicombe.
- * Copyright (c) 1996 Brini.
- *
- * All rights reserved.
- *
- * 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 Brini.
- * 4. The name of the company nor the name of the author may be used to
- *    endorse or promote products derived from this software without specific
- *    prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY BRINI ``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 BRINI 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 <sys/param.h>
-#include <machine/db_machdep.h>
-#include <ddb/db_interface.h>
-#include <ddb/db_sym.h>
-#include <ddb/db_output.h>
-#include <ddb/db_access.h>
-
-#include <arch/arm/arm/disassem.h>
-
-/* Glue code to interface db_disasm to the generic ARM disassembler */
-
-static u_int db_disasm_read_word(u_int);
-static void db_disasm_printaddr(u_int);
-
-static disasm_interface_t db_disasm_interface = {
-       db_disasm_read_word, db_disasm_printaddr, db_printf
-};
-
-static u_int
-db_disasm_read_word(u_int address)
-{
-
-       return db_get_value(address, 4, 0);
-}
-
-static void
-db_disasm_printaddr(u_int address)
-{
-
-       db_printsym((db_addr_t)address, DB_STGY_ANY, db_printf);
-}
-
-vm_offset_t
-db_disasm(vm_offset_t loc, boolean_t altfmt)
-{
-
-       return disasm(&db_disasm_interface, loc, altfmt);
-}
-
-/* End of db_disasm.c */
diff -r 2d716d1d96a9 -r 6f4c491ff9cd sys/arch/arm26/conf/files.arm26
--- a/sys/arch/arm26/conf/files.arm26   Fri Jan 12 19:41:13 2001 +0000
+++ b/sys/arch/arm26/conf/files.arm26   Fri Jan 12 21:31:51 2001 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: files.arm26,v 1.15 2001/01/12 13:43:12 bjh21 Exp $
+# $NetBSD: files.arm26,v 1.16 2001/01/12 21:31:52 bjh21 Exp $
 
 # Copyright (c) 1997, 1998, 2000 Ben Harris
 # All rights reserved.
@@ -211,7 +211,6 @@
 file   dev/cons.c
 file   dev/cninit.c
 
-file   arch/arm26/arm26/db_disasm.c            ddb
 file   arch/arm26/arm26/db_interface.c         ddb
 file   arch/arm26/arm26/db_machdep.c           ddb
 file   arch/arm26/arm26/db_trace.c             ddb
diff -r 2d716d1d96a9 -r 6f4c491ff9cd sys/arch/arm32/arm32/db_disasm.c
--- a/sys/arch/arm32/arm32/db_disasm.c  Fri Jan 12 19:41:13 2001 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,75 +0,0 @@
-/*     $NetBSD: db_disasm.c,v 1.14 2001/01/12 13:43:12 bjh21 Exp $     */
-
-/*
- * Copyright (c) 1996 Mark Brinicombe.
- * Copyright (c) 1996 Brini.
- *
- * All rights reserved.
- *
- * 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 Brini.
- * 4. The name of the company nor the name of the author may be used to
- *    endorse or promote products derived from this software without specific
- *    prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY BRINI ``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 BRINI 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 <sys/param.h>
-#include <machine/db_machdep.h>
-#include <ddb/db_sym.h>
-#include <ddb/db_output.h>
-#include <ddb/db_access.h>
-
-#include <arch/arm/arm/disassem.h>
-
-/* Glue code to interface db_disasm to the generic ARM disassembler */
-
-static u_int
-db_disasm_read_word(address)
-       u_int address;
-{
-       return(db_get_value(address, 4, 0));
-}
-
-static void
-db_disasm_printaddr(address)
-       u_int address;
-{
-       db_printsym((db_addr_t)address, DB_STGY_ANY, db_printf);
-}
-
-vm_offset_t
-db_disasm(loc, altfmt)
-       vm_offset_t loc;
-       boolean_t altfmt;
-{
-       disasm_interface_t di;
-
-       di.di_readword = db_disasm_read_word;
-       di.di_printaddr = db_disasm_printaddr;
-       di.di_printf = db_printf;
-
-       return(disasm(&di, loc, altfmt));
-}
-
-/* End of db_disasm.c */
diff -r 2d716d1d96a9 -r 6f4c491ff9cd sys/arch/arm32/conf/files.arm32
--- a/sys/arch/arm32/conf/files.arm32   Fri Jan 12 19:41:13 2001 +0000
+++ b/sys/arch/arm32/conf/files.arm32   Fri Jan 12 21:31:51 2001 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: files.arm32,v 1.85 2001/01/12 13:43:13 bjh21 Exp $
+#      $NetBSD: files.arm32,v 1.86 2001/01/12 21:31:53 bjh21 Exp $
 #
 # First try for arm-specific configuration info
 #
@@ -382,7 +382,6 @@
 file   arch/arm32/fpe-arm/armfpe.s             armfpe
 
 # DDB
-file   arch/arm32/arm32/db_disasm.c            ddb
 file   arch/arm32/arm32/db_interface.c         ddb
 file   arch/arm32/arm32/db_trace.c             ddb
 file   arch/arm32/arm32/db_machdep.c           ddb



Home | Main Index | Thread Index | Old Index