Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/ddb avoid compiling dead code into crash.
details: https://anonhg.NetBSD.org/src/rev/cde7158f5375
branches: trunk
changeset: 764089:cde7158f5375
user: mrg <mrg%NetBSD.org@localhost>
date: Mon Apr 11 04:26:18 2011 +0000
description:
avoid compiling dead code into crash.
diffstat:
sys/ddb/db_sym.c | 13 ++++++-------
1 files changed, 6 insertions(+), 7 deletions(-)
diffs (41 lines):
diff -r 332a0669699e -r cde7158f5375 sys/ddb/db_sym.c
--- a/sys/ddb/db_sym.c Mon Apr 11 04:22:30 2011 +0000
+++ b/sys/ddb/db_sym.c Mon Apr 11 04:26:18 2011 +0000
@@ -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 */
}
Home |
Main Index |
Thread Index |
Old Index