1 /* $NetBSD: db_machdep.c,v 1.11 2007/02/22 04:38:03 matt Exp $ */
4 * Copyright (c) 1996 Mark Brinicombe
6 * Mach Operating System
7 * Copyright (c) 1991,1990 Carnegie Mellon University
10 * Permission to use, copy, modify and distribute this software and its
11 * documentation is hereby granted, provided that both the copyright
12 * notice and this permission notice appear in all copies of the
13 * software, derivative works or modified versions, and any portions
14 * thereof, and that both notices appear in supporting documentation.
16 * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
17 * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
18 * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
20 * Carnegie Mellon requests users of this software to return to
22 * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
23 * School of Computer Science
24 * Carnegie Mellon University
25 * Pittsburgh PA 15213-3890
27 * any improvements or extensions that they make and grant Carnegie the
28 * rights to redistribute these changes.
31 #include <sys/cdefs.h>
32 __KERNEL_RCSID(0, "$NetBSD: db_machdep.c,v 1.11 2007/02/22 04:38:03 matt Exp $");
34 #include <sys/param.h>
36 #include <sys/vnode.h>
37 #include <sys/systm.h>
39 #include <arm/arm32/db_machdep.h>
41 #include <ddb/db_access.h>
42 #include <ddb/db_sym.h>
43 #include <ddb/db_output.h>
47 db_show_panic_cmd(db_expr_t addr
, bool have_addr
, db_expr_t count
, const char *modif
)
53 db_printf("Panic string: %s\n", panicstr
);
60 db_show_frame_cmd(db_expr_t addr
, bool have_addr
, db_expr_t count
, const char *modif
)
62 struct trapframe
*frame
;
65 db_printf("frame address must be specified\n");
69 frame
= (struct trapframe
*)addr
;
71 db_printf("frame address = %08x ", (u_int
)frame
);
72 db_printf("spsr=%08x\n", frame
->tf_spsr
);
73 db_printf("r0 =%08x r1 =%08x r2 =%08x r3 =%08x\n",
74 frame
->tf_r0
, frame
->tf_r1
, frame
->tf_r2
, frame
->tf_r3
);
75 db_printf("r4 =%08x r5 =%08x r6 =%08x r7 =%08x\n",
76 frame
->tf_r4
, frame
->tf_r5
, frame
->tf_r6
, frame
->tf_r7
);
77 db_printf("r8 =%08x r9 =%08x r10=%08x r11=%08x\n",
78 frame
->tf_r8
, frame
->tf_r9
, frame
->tf_r10
, frame
->tf_r11
);
79 db_printf("r12=%08x r13=%08x r14=%08x r15=%08x\n",
80 frame
->tf_r12
, frame
->tf_usr_sp
, frame
->tf_usr_lr
, frame
->tf_pc
);
81 db_printf("slr=%08x\n", frame
->tf_svc_lr
);