summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorMichael Shalayeff <mickey@cvs.openbsd.org>1997-02-07 06:18:49 +0000
committerMichael Shalayeff <mickey@cvs.openbsd.org>1997-02-07 06:18:49 +0000
commit4adf5e1ea6afb967ddfa4424a937c15e091ff561 (patch)
tree12f9f805f05c243ab4fef9f26b330a8c8c4eaf23 /sys
parent25ce944623192ed7381bcde92621ac9027e242a7 (diff)
necessary support for kernfs.
Diffstat (limited to 'sys')
-rw-r--r--sys/ddb/db_aout.c16
-rw-r--r--sys/ddb/db_extern.h4
-rw-r--r--sys/ddb/db_sym.c14
3 files changed, 29 insertions, 5 deletions
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 <sys/param.h>
#include <sys/systm.h>
#include <sys/proc.h>
+#include <sys/exec_aout.h>
#include <machine/db_machdep.h> /* 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);
+}