perfc=y
perfc_arrays=y
lock_profile=y
-crash_debug=y
frame_pointer=y
lto=y
you've crashed it, you get to poke around and find out why. There's
also a special key handler for making it crash, which is handy.
-You need to have crash_debug=y set when compiling , and you also need
+You need to have CRASH_DEBUG=y set when compiling, and you also need
to enable it on the Xen command line, eg by gdb=com1.
If you need to have a serial port shared between gdb and the console,
the workstation, and aren't using a H/L split console:
* Set debug=y in Config.mk
- * Set crash_debug=y in xen/Rules.mk
+ * Set CRASH_DEBUG=y with `make -C xen menuconfig`
* Make the changes in the attached patch, and build.
* Arrange to pass gdb=com1 as a hypervisor command line argument
(I already have com1=38400,8n1 console=com1,vga sync_console)
You probably want to say 'N' here.
+if DEBUG || EXPERT = "y"
+
+config CRASH_DEBUG
+ bool "Crash Debugging Support"
+ depends on X86
+ ---help---
+ If you want to attach gdb to Xen to debug Xen if it crashes
+ then say Y.
+
+endif # DEBUG || EXPERT
+
endmenu
perfc ?= n
perfc_arrays ?= n
lock_profile ?= n
-crash_debug ?= n
frame_pointer ?= n
lto ?= n
perfc := y
endif
+ifneq ($(origin crash_debug),undefined)
+$(error "You must use 'make menuconfig' to enable/disable crash_debug now.")
+endif
ifeq ($(origin debug),command line)
$(warning "You must use 'make menuconfig' to enable/disable debug now.")
endif
endif
CFLAGS-$(verbose) += -DVERBOSE
-CFLAGS-$(crash_debug) += -DCRASH_DEBUG
CFLAGS-$(perfc) += -DPERF_COUNTERS
CFLAGS-$(perfc_arrays) += -DPERF_ARRAYS
CFLAGS-$(lock_profile) += -DLOCK_PROFILE
obj-y += e820.o
obj-y += extable.o
obj-y += flushtlb.o
+obj-$(CONFIG_CRASH_DEBUG) += gdbstub.o
obj-y += i387.o
obj-y += i8259.o
obj-y += io_apic.o
obj-y += vm_event.o
obj-y += xstate.o
-obj-$(crash_debug) += gdbstub.o
-
x86_emulate.o: x86_emulate/x86_emulate.c x86_emulate/x86_emulate.h
efi-y := $(shell if [ ! -r $(BASEDIR)/include/xen/compile.h -o \
obj-y += cpufreq.o
obj-bin-$(CONFIG_KEXEC) += kexec_reloc.o
-obj-$(crash_debug) += gdbstub.o
+obj-$(CONFIG_CRASH_DEBUG) += gdbstub.o
obj-y += event_2l.o
obj-y += event_channel.o
obj-y += event_fifo.o
+obj-$(CONFIG_CRASH_DEBUG) += gdbstub.o
obj-y += grant_table.o
obj-y += guestcopy.o
obj-bin-y += gunzip.init.o
obj-bin-$(CONFIG_X86) += $(foreach n,decompress bunzip2 unxz unlzma unlzo unlz4 earlycpio,$(n).init.o)
obj-$(perfc) += perfc.o
-obj-$(crash_debug) += gdbstub.o
obj-$(CONFIG_COMPAT) += $(addprefix compat/,domain.o kernel.o memory.o multicall.o xlat.o)
#define DEBUGGER_trap_fatal(_v, _r) \
if ( debugger_trap_fatal(_v, _r) ) return;
-#if defined(CRASH_DEBUG)
+#ifdef CONFIG_CRASH_DEBUG
#include <xen/gdbstub.h>
#include <asm/atomic.h>
#include <asm/page.h>
-#ifdef CRASH_DEBUG
+#ifdef CONFIG_CRASH_DEBUG
struct gdb_context {
int serhnd; /* handle on our serial line */