PERFORCE change 102614 for review
John Baldwin
jhb at FreeBSD.org
Thu Jul 27 22:29:05 UTC 2006
http://perforce.freebsd.org/chv.cgi?CH=102614
Change 102614 by jhb at jhb_mutex on 2006/07/27 22:27:59
As cute as 'kldstat' in ddb might be, on second thought I'm not sure
it's really all that useful. In gdb it is useful as an aid to getting
symbols loaded for kernel modules, but ddb doesn't need that.
Affected files ...
.. //depot/projects/smpng/sys/kern/kern_linker.c#81 edit
.. //depot/projects/smpng/sys/kern/kern_module.c#23 edit
.. //depot/projects/smpng/sys/sys/module.h#9 edit
Differences ...
==== //depot/projects/smpng/sys/kern/kern_linker.c#81 (text+ko) ====
@@ -54,10 +54,6 @@
#include "linker_if.h"
-#ifdef DDB
-#include <ddb/ddb.h>
-#endif
-
#ifdef HWPMC_HOOKS
#include <sys/pmckern.h>
#endif
@@ -2016,28 +2012,3 @@
SYSCTL_PROC(_kern, OID_AUTO, function_list, CTLFLAG_RD,
NULL, 0, sysctl_kern_function_list, "", "kernel function list");
-
-#ifdef DDB
-DB_COMMAND(kldstat, db_kldstat)
-{
- linker_file_t lf;
- int verbose;
-
- verbose = index(modif, 'v') != NULL;
-#ifdef __LP64__
- db_printf("Id Refs Address Size Name\n");
-#else
- db_printf("Id Refs Address Size Name\n");
-#endif
- TAILQ_FOREACH(lf, &linker_files, link) {
- if (db_pager_quit)
- return;
- db_printf("%2d %4d %p %-8zx %s\n", lf->id, lf->refs,
- lf->address, lf->size, lf->filename);
- if (!verbose)
- continue;
- db_printf(" Contains modules:\n");
- db_show_modules(lf, " ");
- }
-}
-#endif
==== //depot/projects/smpng/sys/kern/kern_module.c#23 (text+ko) ====
@@ -25,7 +25,6 @@
*/
#include "opt_compat.h"
-#include "opt_ddb.h"
#include <sys/cdefs.h>
__FBSDID("$FreeBSD: src/sys/kern/kern_module.c,v 1.51 2006/06/26 18:34:45 jhb Exp $");
@@ -45,10 +44,6 @@
#include <sys/module.h>
#include <sys/linker.h>
-#ifdef DDB
-#include <ddb/ddb.h>
-#endif
-
static MALLOC_DEFINE(M_MODULE, "module", "module data structures");
typedef TAILQ_HEAD(, module) modulelist_t;
@@ -509,18 +504,3 @@
return (error);
}
#endif
-
-#ifdef DDB
-void
-db_show_modules(linker_file_t lf, const char *prefix)
-{
- module_t mod;
-
- db_printf("%sId Name\n", prefix);
- TAILQ_FOREACH(mod, &lf->modules, flink) {
- if (db_pager_quit)
- return;
- db_printf("%s%-4d %s\n", prefix, mod->id, mod->name);
- }
-}
-#endif
==== //depot/projects/smpng/sys/sys/module.h#9 (text+ko) ====
@@ -148,9 +148,6 @@
module_t module_getfnext(module_t);
void module_setspecific(module_t, modspecific_t *);
struct linker_file *module_file(module_t);
-#ifdef DDB
-void db_show_modules(struct linker_file *, const char *);
-#endif
#ifdef MOD_DEBUG
extern int mod_debug;
More information about the p4-projects
mailing list