From c46e7e775612eeaaa1411cc5fda841a6bf17aa24 Mon Sep 17 00:00:00 2001 From: christos Date: Thu, 28 Jan 1999 20:06:31 +0000 Subject: [PATCH] Use btinfo_symtab to find the symbol table if it is available. --- sys/arch/i386/i386/machdep.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/sys/arch/i386/i386/machdep.c b/sys/arch/i386/i386/machdep.c index 063c95aedb54..d4b4ed0ed4f0 100644 --- a/sys/arch/i386/i386/machdep.c +++ b/sys/arch/i386/i386/machdep.c @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.335 1999/01/16 20:30:34 chuck Exp $ */ +/* $NetBSD: machdep.c,v 1.336 1999/01/28 20:06:31 christos Exp $ */ /*- * Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc. @@ -1959,8 +1959,17 @@ init386(first_avail) { extern int end; extern int *esym; + struct btinfo_symtab *symtab; - ddb_init(*(int *)&end, ((int *)&end) + 1, esym); + symtab = lookup_bootinfo(BTINFO_SYMTAB); + if (symtab) { + symtab->ssym += KERNBASE; + symtab->esym += KERNBASE; + ddb_init(symtab->nsym, (int *)symtab->ssym, + (int *)symtab->esym); + } + else + ddb_init(*(int *)&end, ((int *)&end) + 1, esym); } if (boothowto & RB_KDB) Debugger();