diff --git a/sys/arch/arm32/arm32/db_interface.c b/sys/arch/arm32/arm32/db_interface.c index 1360fe223e1f..7172a6145a65 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.1 1996/02/15 22:37:20 mark Exp $ */ +/* $NetBSD: db_interface.c,v 1.2 1996/02/22 22:38:48 mark Exp $ */ /* * Copyright (c) 1996 Scott K. Stevens @@ -29,7 +29,7 @@ * * From: db_interface.c,v 2.4 1991/02/05 17:11:13 mrt (CMU) * - * $Id: db_interface.c,v 1.1 1996/02/15 22:37:20 mark Exp $ + * $Id: db_interface.c,v 1.2 1996/02/22 22:38:48 mark Exp $ */ /* @@ -40,6 +40,7 @@ #include #include #include /* just for boothowto */ +#include #include #include @@ -240,9 +241,28 @@ db_trapper(addr, inst, frame) return(0); } +extern u_int esym; +extern u_int end; + void db_machine_init() { + struct exec *kernexec = (struct exec *)KERNEL_BASE; + u_int *ptr; + int len; + +/* + * The boot loader currently loads the kernel with the a.out header still attached. + */ + + if (kernexec->a_syms == 0) { + printf("(no syms) "); + } else { + esym = (int)&end + kernexec->a_syms + sizeof(int); + len = *((u_int *)esym); + esym += (len + (sizeof(u_int) - 1)) & ~(sizeof(u_int) - 1); + } + install_coproc_handler(0, db_trapper); db_machine_commands_install(arm32_db_command_table); }