new kdb-4.1 patch for linux-2.5.68
Christoph Hellwig
hch at infradead.org
Thu May 1 13:18:34 PDT 2003
A few comments:
diff -urN -X dontdiff linux-2.5.68.orig/Makefile linux-2.5.68/Makefile
--- linux-2.5.68.orig/Makefile Thu Apr 24 10:46:50 2003
+++ linux-2.5.68/Makefile Tue Apr 29 09:15:17 2003
@@ -170,8 +170,8 @@
else echo rpm; fi)
GENKSYMS = scripts/genksyms/genksyms
DEPMOD = /sbin/depmod
-KALLSYMS = scripts/kallsyms
This doesn't seem to be related to kdb, what about sending it
directly to Kai/Linus?
NOSTDINC_FLAGS = -nostdinc -iwithprefix include
CPPFLAGS := -D__KERNEL__ -Iinclude
+CPPFLAGS += $(patsubst %,-I%,$(CROSS_COMPILE_INC))
CFLAGS := $(CPPFLAGS) -Wall -Wstrict-prototypes -Wno-trigraphs -O2 \
-fno-strict-aliasing -fno-common
AFLAGS := -D__ASSEMBLY__ $(CPPFLAGS)
Not needed anymore.
@@ -238,9 +239,14 @@
endif
+ifndef CONFIG_FRAME_POINTER
+CFLAGS += -fomit-frame-pointer
+endif
+
The makefile aready contains that in a different place.
include arch/$(ARCH)/Makefile
core-y += kernel/ mm/ fs/ ipc/ security/ crypto/
+core-$(CONFIG_KDB) += kdb/
Please add this to core-y and make the objects conditional in
kdb/Makefile. This is not a funtional requirement but the style
used by the other makefiles.
--- linux-2.5.68.orig/arch/i386/Kconfig Thu Apr 24 10:46:50 2003
+++ linux-2.5.68/arch/i386/Kconfig Thu Apr 24 17:30:44 2003
@@ -1505,12 +1505,78 @@
This options enables addition error checking for high memory systems.
Disable for production systems.
+config FRAME_POINTER
+ bool "Compile the kernel with frame pointers"
+ depends on DEBUG_KERNEL
+ help
+ If you say Y here, the resulting kernel will be slightly larger and
+ slower, but it will give very useful debugging information. If you
+ don't debug the kernel, you can say N, but we may not be able to
+ solve problems without frame pointers.
Again, this option already exists :)
+if KDB = y
+config KALLSYMS
+ bool
+ default y
+comment "KALLSYMS is required for KDB"
+endif
+
+if KDB = n
config KALLSYMS
bool "Load all symbols for debugging/kksymoops"
help
Say Y here to let the kernel print out symbolic crash information and
symbolic stack backtraces. This increases the size of the kernel
somewhat, as all symbols have to be loaded into the kernel image.
+endif
Maybe just add a default y if KDB line?
--- linux-2.5.68.orig/arch/i386/kdb/pc_keyb.h Wed Dec 31 19:00:00 1969
+++ linux-2.5.68/arch/i386/kdb/pc_keyb.h Fri Apr 25 09:10:54 2003
This file is gone for a reason.. Why do you think you need it?
diff -urN -X dontdiff linux-2.5.68.orig/include/linux/sched.h linux-2.5.68/include/linux/sched.h
--- linux-2.5.68.orig/include/linux/sched.h Thu Apr 24 10:47:07 2003
+++ linux-2.5.68/include/linux/sched.h Mon Apr 28 09:22:54 2003
@@ -672,6 +672,31 @@
extern task_t * FASTCALL(next_thread(task_t *p));
+#ifdef CONFIG_KDB
+/*
+ * kdb needs its own version of do_each_thread/while_each_thread
+ * to avoid the lock debug. It should also evolve to do sanity checks
+ * on the pointers it follows.
Shouldn't this be in a kdb header?
+#ifdef CONFIG_KDB
+static int __init kdb_setup(char *str)
+{
+ /* kdb, kdb=on, kdb=off, kdb=early */
+ if (strcmp(str, "on") == 0) {
+ kdb_on = 1;
+ } else if (strcmp(str, "off") == 0) {
+ kdb_on = 0;
+ } else if (strcmp(str, "early") == 0) {
+ kdb_on = 1;
+ kdb_flags |= KDB_FLAG_EARLYKDB;
+ } else
+ printk("Boot flag %s not recognised\n", str);
+}
+__setup("kdb=", kdb_setup);
+#endif /* CONFIG_KDB */
This should move into a kdb file, too.
More information about the kdb
mailing list