diff options
author | kstailey <kstailey@cvs.openbsd.org> | 1997-11-17 17:34:56 +0000 |
---|---|---|
committer | kstailey <kstailey@cvs.openbsd.org> | 1997-11-17 17:34:56 +0000 |
commit | edc0c6d2501db244dfdfd4d16347e650ef290ee0 (patch) | |
tree | a7c6a8b817dc08e779466d91587b0a5bd852ebbb /usr.sbin | |
parent | 2fc3c75f3dc47098c2ea99fcb249986a957d6a4b (diff) |
remove parts of dbsym
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/dbsym/Makefile | 6 | ||||
-rw-r--r-- | usr.sbin/dbsym/dbsym.8 | 46 | ||||
-rw-r--r-- | usr.sbin/dbsym/dbtest.c | 58 |
3 files changed, 0 insertions, 110 deletions
diff --git a/usr.sbin/dbsym/Makefile b/usr.sbin/dbsym/Makefile deleted file mode 100644 index 715c125e4ab..00000000000 --- a/usr.sbin/dbsym/Makefile +++ /dev/null @@ -1,6 +0,0 @@ -# $OpenBSD: Makefile,v 1.2 1997/09/21 11:43:35 deraadt Exp $ - -PROG=dbsym -MAN=dbsym.8 - -.include <bsd.prog.mk> diff --git a/usr.sbin/dbsym/dbsym.8 b/usr.sbin/dbsym/dbsym.8 deleted file mode 100644 index eb9264dd2fb..00000000000 --- a/usr.sbin/dbsym/dbsym.8 +++ /dev/null @@ -1,46 +0,0 @@ -.\" $Id: dbsym.8,v 1.2 1996/07/08 22:09:46 ccappuc Exp $ -.\" -.Dd 12 May 1994 -.Dt DBSYM 8 sun3 -.Os -.Sh NAME -.Nm dbsym -.Nd copy kernel symbol table into db_symtab space -.Sh SYNOPSIS -.Nm dbsym -.Ar kernel -.Sh DESCRIPTION -.Nm dbsym -is used to copy the symbol table in a newly linked kernel into the -.Nm db_symtab -array (in the data section) so that the -.Nm ddb -kernel debugger can find the symbols. This is program is only used -on systems for which the boot program does not load the symbol table -into memory with the kernel. The space for these symbols is -reserved in the data segment using a config option like: -.Pp -.Li options SYMTAB_SPACE=72000 -.Pp -The size of the db_symtab array (the value of SYMTAB_SPACE) must be -at least as large as the kernel symbol table. If insufficient space -is reserved, dbsym will refuse to copy the symbol table. -.Pp -Note that debugging symbols are not useful to the -.Nm ddb -kernel debugger, so to minimize the size of the kernel, one should -either compile the kernel without debugging symbols (no -.Nm -g -flag) or use the -.Nm strip -command to strip debugging symbols from the kernel before -.Nm dbsym -is used to copy the symbol table. The command -.Pp -.Li strip -d bsd -.Pp -will strip out debugging symbols. -.Sh "SEE ALSO" -.Xr strip 1 -.Xr ddb 8 -.\" XXX - Reminder, need: /src/share/man/man8/ddb.8 diff --git a/usr.sbin/dbsym/dbtest.c b/usr.sbin/dbsym/dbtest.c deleted file mode 100644 index 3db6c667c77..00000000000 --- a/usr.sbin/dbsym/dbtest.c +++ /dev/null @@ -1,58 +0,0 @@ - -#include <stdio.h> -#include <a.out.h> - -#define SYMTAB_SPACE 0x8000 -int db_symtabsize = SYMTAB_SPACE; -char db_symtab[SYMTAB_SPACE] = { 0,0,0,0,1 }; -/* - * The actual format of the above is: - * int symtab_length = NSYMS; - * struct nlist[NSYMS]; - * int strtab_length; - * char strtab[]; - */ - -/* Print out our symbol table. */ -main() -{ - struct nlist *nl; - int symtab_len, strtab_len; - char *strtab; - char *p; - int *ip; - int st, sc, x; - - /* symbol table */ - ip = (int*) db_symtab; - symtab_len = *ip++; - if (symtab_len < 4) { - printf("no symbol table\n"); - exit(1); - } - nl = (struct nlist *) ip; - - /* string table pointer and length */ - ip = (int*) ((char*)ip + symtab_len); - strtab = (char*)ip; - strtab_len = *ip; - - if (strtab_len > (SYMTAB_SPACE - symtab_len)) - strtab_len = (SYMTAB_SPACE - symtab_len); - - /* print symbol table */ - while ((x=nl->n_un.n_strx) != 0) { - if (x < 0 || x >= strtab_len) p = "?"; - else p = strtab + x; - st = nl->n_type & 0x1F; - sc = "uatdbxxxxcxxxxxxx"[st>1]; - if (st & 1) sc &= ~0x20; /* to upper */ - printf("%08X %c %s\n", nl->n_value, sc, p); - nl++; - if ((char*)nl >= strtab) { - printf("symbol table missing null terminator\n"); - break; - } - } - exit(0); -} |