diff --git a/sys/arch/arm32/arm32/db_interface.c b/sys/arch/arm32/arm32/db_interface.c index 81de63999f62..7d0e250c87fe 100644 --- a/sys/arch/arm32/arm32/db_interface.c +++ b/sys/arch/arm32/arm32/db_interface.c @@ -1,4 +1,4 @@ -/* $NetBSD: db_interface.c,v 1.7 1996/06/03 21:53:34 mark Exp $ */ +/* $NetBSD: db_interface.c,v 1.8 1996/06/12 19:57:08 mark Exp $ */ /* * Copyright (c) 1996 Scott K. Stevens @@ -233,13 +233,15 @@ Debugger() } void db_show_vmstat_cmd __P((db_expr_t addr, int have_addr, db_expr_t count, char *modif)); -void db_show_fs_cmd __P((db_expr_t addr, int have_addr, db_expr_t count, char *modif)); -void db_show_vnode_cmd __P((db_expr_t addr, int have_addr, db_expr_t count, char *modif)); +void db_show_fs_cmd __P((db_expr_t addr, int have_addr, db_expr_t count, char *modif)); +void db_show_vnode_cmd __P((db_expr_t addr, int have_addr, db_expr_t count, char *modif)); +void db_show_intrchain_cmd __P((db_expr_t addr, int have_addr, db_expr_t count, char *modif)); struct db_command arm32_db_command_table[] = { { "vmstat", db_show_vmstat_cmd, 0, NULL }, { "fs", db_show_fs_cmd, 0, NULL }, { "vnode", db_show_vnode_cmd, 0, NULL }, + { "intrchain", db_show_intrchain_cmd, 0, NULL }, { NULL, NULL, 0, NULL } }; diff --git a/sys/arch/arm32/arm32/db_machdep.c b/sys/arch/arm32/arm32/db_machdep.c index 370db63665f9..5759f59eb44a 100644 --- a/sys/arch/arm32/arm32/db_machdep.c +++ b/sys/arch/arm32/arm32/db_machdep.c @@ -1,4 +1,4 @@ -/* $NetBSD: db_machdep.c,v 1.3 1996/06/03 21:53:35 mark Exp $ */ +/* $NetBSD: db_machdep.c,v 1.4 1996/06/12 19:57:06 mark Exp $ */ /* * Copyright (c) 1996 Mark Brinicombe @@ -33,12 +33,15 @@ #include #include #include + #include #include #include #include +#include + void db_show_fs_cmd(addr, have_addr, count, modif) db_expr_t addr; @@ -163,3 +166,35 @@ db_show_vmstat_cmd(addr, have_addr, count, modif) db_printf("%9u pages inactive\n", sum.v_inactive_count); db_printf("%9u bytes per page\n", sum.v_page_size); } + +void +db_show_intrchain_cmd(addr, have_addr, count, modif) + db_expr_t addr; + int have_addr; + db_expr_t count; + char *modif; +{ + int loop; + irqhandler_t *ptr; + char *name; + db_expr_t offset; + + for (loop = 0; loop < NIRQS; ++loop) { + ptr = irqhandlers[loop]; + if (ptr) { + db_printf("IRQ %d\n", loop); + + while (ptr) { + db_printf(" %-13s %d ", ptr->ih_name, ptr->ih_level); + db_find_sym_and_offset((u_int)ptr->ih_func, &name, &offset); + if (name == NULL) + name = "?"; + + db_printf("%s(", name); + db_printsym((u_int)ptr->ih_func, DB_STGY_PROC); + db_printf(") %08x\n", (u_int)ptr->ih_arg); + ptr = ptr->ih_next; + } + } + } +}