Annotation of sys/arch/arm/arm/db_machdep.c, Revision 1.1
1.1 ! nbrk 1: /* $OpenBSD: db_machdep.c,v 1.3 2005/01/03 16:49:56 miod Exp $ */
! 2: /* $NetBSD: db_machdep.c,v 1.8 2003/07/15 00:24:41 lukem Exp $ */
! 3:
! 4: /*
! 5: * Copyright (c) 1996 Mark Brinicombe
! 6: *
! 7: * Mach Operating System
! 8: * Copyright (c) 1991,1990 Carnegie Mellon University
! 9: * All Rights Reserved.
! 10: *
! 11: * Permission to use, copy, modify and distribute this software and its
! 12: * documentation is hereby granted, provided that both the copyright
! 13: * notice and this permission notice appear in all copies of the
! 14: * software, derivative works or modified versions, and any portions
! 15: * thereof, and that both notices appear in supporting documentation.
! 16: *
! 17: * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
! 18: * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
! 19: * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
! 20: *
! 21: * Carnegie Mellon requests users of this software to return to
! 22: *
! 23: * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
! 24: * School of Computer Science
! 25: * Carnegie Mellon University
! 26: * Pittsburgh PA 15213-3890
! 27: *
! 28: * any improvements or extensions that they make and grant Carnegie the
! 29: * rights to redistribute these changes.
! 30: */
! 31:
! 32: #include <sys/param.h>
! 33: #include <sys/proc.h>
! 34: #include <sys/vnode.h>
! 35: #include <sys/systm.h>
! 36:
! 37: #include <arm/db_machdep.h>
! 38:
! 39: #include <ddb/db_access.h>
! 40: #include <ddb/db_sym.h>
! 41: #include <ddb/db_output.h>
! 42:
! 43: void
! 44: db_show_frame_cmd(addr, have_addr, count, modif)
! 45: db_expr_t addr;
! 46: int have_addr;
! 47: db_expr_t count;
! 48: char *modif;
! 49: {
! 50: struct trapframe *frame;
! 51:
! 52: if (!have_addr) {
! 53: db_printf("frame address must be specified\n");
! 54: return;
! 55: }
! 56:
! 57: frame = (struct trapframe *)addr;
! 58:
! 59: db_printf("frame address = %08x ", (u_int)frame);
! 60: db_printf("spsr=%08x\n", frame->tf_spsr);
! 61: db_printf("r0 =%08x r1 =%08x r2 =%08x r3 =%08x\n",
! 62: frame->tf_r0, frame->tf_r1, frame->tf_r2, frame->tf_r3);
! 63: db_printf("r4 =%08x r5 =%08x r6 =%08x r7 =%08x\n",
! 64: frame->tf_r4, frame->tf_r5, frame->tf_r6, frame->tf_r7);
! 65: db_printf("r8 =%08x r9 =%08x r10=%08x r11=%08x\n",
! 66: frame->tf_r8, frame->tf_r9, frame->tf_r10, frame->tf_r11);
! 67: db_printf("r12=%08x r13=%08x r14=%08x r15=%08x\n",
! 68: frame->tf_r12, frame->tf_usr_sp, frame->tf_usr_lr, frame->tf_pc);
! 69: db_printf("slr=%08x\n", frame->tf_svc_lr);
! 70: }
CVSweb