From: mickey Date: Fri, 7 Feb 1997 06:18:44 +0000 (+0000) Subject: necessary support for kernfs. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=407cf1b4d91e0e864b48fe71275d95c74ff39c4e;p=openbsd necessary support for kernfs. --- diff --git a/sys/ddb/db_aout.c b/sys/ddb/db_aout.c index 6fd9ea3a03d..8f9840c6cc1 100644 --- a/sys/ddb/db_aout.c +++ b/sys/ddb/db_aout.c @@ -1,4 +1,4 @@ -/* $OpenBSD: db_aout.c,v 1.11 1996/08/23 19:53:46 niklas Exp $ */ +/* $OpenBSD: db_aout.c,v 1.12 1997/02/07 06:18:44 mickey Exp $ */ /* $NetBSD: db_aout.c,v 1.14 1996/02/27 20:54:43 gwr Exp $ */ /* @@ -31,6 +31,7 @@ #include #include #include +#include #include /* data types */ @@ -351,6 +352,19 @@ X_db_sym_numargs(symtab, cursym, nargp, argnamep) return FALSE; } +void +X_db_stub_xh(sym, xh) + db_symtab_t sym; + struct exec *xh; +{ + extern char kernel_text[]; + + bzero(xh, sizeof(*xh)); + xh->a_midmag = htonl((((0 << 10) | MID_ZERO) << 16) | ZMAGIC); + xh->a_syms = *sym->rstart; + xh->a_entry = (u_long)kernel_text; +} + /* * Initialization routine for a.out files. */ diff --git a/sys/ddb/db_extern.h b/sys/ddb/db_extern.h index c550636656d..e690d76cf7f 100644 --- a/sys/ddb/db_extern.h +++ b/sys/ddb/db_extern.h @@ -1,4 +1,4 @@ -/* $OpenBSD: db_extern.h,v 1.6 1996/09/27 14:42:32 briggs Exp $ */ +/* $OpenBSD: db_extern.h,v 1.7 1997/02/07 06:18:46 mickey Exp $ */ /* $NetBSD: db_extern.h,v 1.1 1996/02/05 01:57:00 christos Exp $ */ /* @@ -44,6 +44,8 @@ void db_printsym __P((db_expr_t, db_strategy_t)); boolean_t X_db_line_at_pc __P((db_symtab_t, db_sym_t, char **, int *, db_expr_t)); int X_db_sym_numargs __P((db_symtab_t, db_sym_t, int *, char **)); +struct exec; +void X_db_stub_xh __P((db_symtab_t, struct exec *)); void ddb_init __P((void)); /* db_examine.c */ diff --git a/sys/ddb/db_sym.c b/sys/ddb/db_sym.c index 935ea8b09a1..577f3de7e8c 100644 --- a/sys/ddb/db_sym.c +++ b/sys/ddb/db_sym.c @@ -1,4 +1,4 @@ -/* $OpenBSD: db_sym.c,v 1.16 1996/08/23 19:53:48 niklas Exp $ */ +/* $OpenBSD: db_sym.c,v 1.17 1997/02/07 06:18:48 mickey Exp $ */ /* $NetBSD: db_sym.c,v 1.12 1996/02/05 01:57:15 christos Exp $ */ /* @@ -76,9 +76,9 @@ db_add_symbol_table(start, end, name, ref, rend) new->start = start; new->end = end; - new->rend = rend; new->name = name; - new->private = ref; + new->rstart = ref; + new->private = rend; new->id = db_nsymtabs; TAILQ_INSERT_TAIL(&db_symtabs, new, list); @@ -391,3 +391,11 @@ db_sym_numargs(sym, nargp, argnames) { return X_db_sym_numargs(db_last_symtab, sym, nargp, argnames); } + +void +db_stub_xh(sym, xh) + db_symtab_t sym; + struct exec *xh; +{ + X_db_stub_xh(sym, xh); +}