| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | /* $NetBSD: db_interface.c,v 1.25 2011/01/22 19:35:48 skrll Exp $ */ | | 1 | /* $NetBSD: db_interface.c,v 1.26 2011/01/22 20:24:48 skrll Exp $ */ |
2 | | | 2 | |
3 | /* $OpenBSD: db_interface.c,v 1.16 2001/03/22 23:31:45 mickey Exp $ */ | | 3 | /* $OpenBSD: db_interface.c,v 1.16 2001/03/22 23:31:45 mickey Exp $ */ |
4 | | | 4 | |
5 | /* | | 5 | /* |
6 | * Copyright (c) 1999-2003 Michael Shalayeff | | 6 | * Copyright (c) 1999-2003 Michael Shalayeff |
7 | * All rights reserved. | | 7 | * All rights reserved. |
8 | * | | 8 | * |
9 | * Redistribution and use in source and binary forms, with or without | | 9 | * Redistribution and use in source and binary forms, with or without |
10 | * modification, are permitted provided that the following conditions | | 10 | * modification, are permitted provided that the following conditions |
11 | * are met: | | 11 | * are met: |
12 | * 1. Redistributions of source code must retain the above copyright | | 12 | * 1. Redistributions of source code must retain the above copyright |
13 | * notice, this list of conditions and the following disclaimer. | | 13 | * notice, this list of conditions and the following disclaimer. |
14 | * 2. Redistributions in binary form must reproduce the above copyright | | 14 | * 2. Redistributions in binary form must reproduce the above copyright |
| @@ -19,27 +19,27 @@ | | | @@ -19,27 +19,27 @@ |
19 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES | | 19 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
20 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. | | 20 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
21 | * IN NO EVENT SHALL THE AUTHOR OR HIS RELATIVES BE LIABLE FOR ANY DIRECT, | | 21 | * IN NO EVENT SHALL THE AUTHOR OR HIS RELATIVES BE LIABLE FOR ANY DIRECT, |
22 | * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | | 22 | * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES |
23 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | | 23 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR |
24 | * SERVICES; LOSS OF MIND, USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | | 24 | * SERVICES; LOSS OF MIND, USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) |
25 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | | 25 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, |
26 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING | | 26 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING |
27 | * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF | | 27 | * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF |
28 | * THE POSSIBILITY OF SUCH DAMAGE. | | 28 | * THE POSSIBILITY OF SUCH DAMAGE. |
29 | */ | | 29 | */ |
30 | | | 30 | |
31 | #include <sys/cdefs.h> | | 31 | #include <sys/cdefs.h> |
32 | __KERNEL_RCSID(0, "$NetBSD: db_interface.c,v 1.25 2011/01/22 19:35:48 skrll Exp $"); | | 32 | __KERNEL_RCSID(0, "$NetBSD: db_interface.c,v 1.26 2011/01/22 20:24:48 skrll Exp $"); |
33 | | | 33 | |
34 | #include <sys/param.h> | | 34 | #include <sys/param.h> |
35 | #include <sys/systm.h> | | 35 | #include <sys/systm.h> |
36 | #include <sys/proc.h> | | 36 | #include <sys/proc.h> |
37 | | | 37 | |
38 | #include <machine/db_machdep.h> | | 38 | #include <machine/db_machdep.h> |
39 | #include <machine/frame.h> | | 39 | #include <machine/frame.h> |
40 | #include <machine/cpufunc.h> | | 40 | #include <machine/cpufunc.h> |
41 | | | 41 | |
42 | #include <ddb/db_access.h> | | 42 | #include <ddb/db_access.h> |
43 | #include <ddb/db_command.h> | | 43 | #include <ddb/db_command.h> |
44 | #include <ddb/db_output.h> | | 44 | #include <ddb/db_output.h> |
45 | #include <ddb/db_run.h> | | 45 | #include <ddb/db_run.h> |
| @@ -52,28 +52,28 @@ __KERNEL_RCSID(0, "$NetBSD: db_interface | | | @@ -52,28 +52,28 @@ __KERNEL_RCSID(0, "$NetBSD: db_interface |
52 | #include <dev/cons.h> | | 52 | #include <dev/cons.h> |
53 | | | 53 | |
54 | void kdbprinttrap(int, int); | | 54 | void kdbprinttrap(int, int); |
55 | | | 55 | |
56 | extern label_t *db_recover; | | 56 | extern label_t *db_recover; |
57 | extern int db_active; | | 57 | extern int db_active; |
58 | extern const char *trap_type[]; | | 58 | extern const char *trap_type[]; |
59 | extern int trap_types; | | 59 | extern int trap_types; |
60 | | | 60 | |
61 | db_regs_t ddb_regs; | | 61 | db_regs_t ddb_regs; |
62 | const struct db_variable db_regs[] = { | | 62 | const struct db_variable db_regs[] = { |
63 | { "flags", (long *)&ddb_regs.tf_flags, FCN_NULL }, | | 63 | { "flags", (long *)&ddb_regs.tf_flags, FCN_NULL }, |
64 | { "r1", (long *)&ddb_regs.tf_r1, FCN_NULL }, | | 64 | { "r1", (long *)&ddb_regs.tf_r1, FCN_NULL }, |
65 | { "rp", (long *)&ddb_regs.tf_rp, FCN_NULL }, | | 65 | { "r2(rp)", (long *)&ddb_regs.tf_rp, FCN_NULL }, |
66 | { "r3", (long *)&ddb_regs.tf_r3, FCN_NULL }, | | 66 | { "r3(fp)", (long *)&ddb_regs.tf_r3, FCN_NULL }, |
67 | { "r4", (long *)&ddb_regs.tf_r4, FCN_NULL }, | | 67 | { "r4", (long *)&ddb_regs.tf_r4, FCN_NULL }, |
68 | { "r5", (long *)&ddb_regs.tf_r5, FCN_NULL }, | | 68 | { "r5", (long *)&ddb_regs.tf_r5, FCN_NULL }, |
69 | { "r6", (long *)&ddb_regs.tf_r6, FCN_NULL }, | | 69 | { "r6", (long *)&ddb_regs.tf_r6, FCN_NULL }, |
70 | { "r7", (long *)&ddb_regs.tf_r7, FCN_NULL }, | | 70 | { "r7", (long *)&ddb_regs.tf_r7, FCN_NULL }, |
71 | { "r8", (long *)&ddb_regs.tf_r8, FCN_NULL }, | | 71 | { "r8", (long *)&ddb_regs.tf_r8, FCN_NULL }, |
72 | { "r9", (long *)&ddb_regs.tf_r9, FCN_NULL }, | | 72 | { "r9", (long *)&ddb_regs.tf_r9, FCN_NULL }, |
73 | { "r10", (long *)&ddb_regs.tf_r10, FCN_NULL }, | | 73 | { "r10", (long *)&ddb_regs.tf_r10, FCN_NULL }, |
74 | { "r11", (long *)&ddb_regs.tf_r11, FCN_NULL }, | | 74 | { "r11", (long *)&ddb_regs.tf_r11, FCN_NULL }, |
75 | { "r12", (long *)&ddb_regs.tf_r12, FCN_NULL }, | | 75 | { "r12", (long *)&ddb_regs.tf_r12, FCN_NULL }, |
76 | { "r13", (long *)&ddb_regs.tf_r13, FCN_NULL }, | | 76 | { "r13", (long *)&ddb_regs.tf_r13, FCN_NULL }, |
77 | { "r14", (long *)&ddb_regs.tf_r14, FCN_NULL }, | | 77 | { "r14", (long *)&ddb_regs.tf_r14, FCN_NULL }, |
78 | { "r15", (long *)&ddb_regs.tf_r15, FCN_NULL }, | | 78 | { "r15", (long *)&ddb_regs.tf_r15, FCN_NULL }, |
79 | { "r16", (long *)&ddb_regs.tf_r16, FCN_NULL }, | | 79 | { "r16", (long *)&ddb_regs.tf_r16, FCN_NULL }, |