Module Name: src
Committed By: mrg
Date: Mon Apr 11 04:26:18 UTC 2011
Modified Files:
src/sys/ddb: db_sym.c
Log Message:
avoid compiling dead code into crash.
To generate a diff of this commit:
cvs rdiff -u -r1.60 -r1.61 src/sys/ddb/db_sym.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/ddb/db_sym.c
diff -u src/sys/ddb/db_sym.c:1.60 src/sys/ddb/db_sym.c:1.61
--- src/sys/ddb/db_sym.c:1.60 Mon Apr 11 04:22:32 2011
+++ src/sys/ddb/db_sym.c Mon Apr 11 04:26:18 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: db_sym.c,v 1.60 2011/04/11 04:22:32 mrg Exp $ */
+/* $NetBSD: db_sym.c,v 1.61 2011/04/11 04:26:18 mrg Exp $ */
/*
* Mach Operating System
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: db_sym.c,v 1.60 2011/04/11 04:22:32 mrg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: db_sym.c,v 1.61 2011/04/11 04:26:18 mrg Exp $");
#ifdef _KERNEL_OPT
#include "opt_ddbparam.h"
@@ -46,7 +46,8 @@
#ifndef _KERNEL
#define TBLNAME "netbsd"
-static int use_ksyms = true;
+#define use_ksyms 0
+
const db_symformat_t *db_symformat;
static db_forall_func_t db_sift;
extern db_symformat_t db_symformat_aout;
@@ -66,10 +67,8 @@
ksyms_addsyms_elf(symsize, vss, vse); /* Will complain if necessary */
#else /* _KERNEL */
db_symformat = &db_symformat_elf;
- if ((*db_symformat->sym_init)(symsize, vss, vse, TBLNAME) == true) {
- use_ksyms = false;
- return;
- }
+ if ((*db_symformat->sym_init)(symsize, vss, vse, TBLNAME) != true)
+ printf("sym_init failed");
#endif /* _KERNEL */
}