Hi, I am a beginner trying to setup kgdb debugging for an x86_64 target using the serial port I have tried using kernel 2.6.21.1 and 2.6.21.7 with the latest kgdb repository patches (the repository patches at http://sourceforge.net/projects/kgdb are against 2.6.21) I have applied the following patches: core-lite.patch x86_64-lite.patch x86_64-hw_breakpoints.patch x86_64-no_context_hook.patch 8250.patch and enabled: CONFIG_KGDB CONFIG_KGDB_CONSOLE CONFIG_KGDB_8250_NOMODULE I am making sure I am using the correct serial port /dev/ttyS0. I have tried using both the simple boot parameter kgdb8250=0,115200 and the more complex kgdb8250=io,3f8,115200,4 which corresponds to the ioport and irq of my /dev/ttyS0 (the latter more complex choice was made at menuconfig) In all cases, gdb from the debugging host can connect, but I always hit this breakpoint (gdb) set remotebaud 115200 (gdb) target remote /dev/ttyS0 Remote debugging using /dev/ttyS0 warning: shared library handler failed to enable breakpoint breakpoint () at kernel/kgdb.c:1767 1767 atomic_set(&kgdb_setting_breakpoint, 0); (gdb) bt #0 breakpoint () at kernel/kgdb.c:1767 #1 0xffffffff802605ad in kgdb_panic_notify (self=0xffffffff804c0490, cmd=0, ptr=0x0) at kernel/kgdb.c:1482 #2 0xffffffff804048b4 in notifier_call_chain (nl=<value optimized out>, val=0, v=0xffffffff806504e0) at kernel/sys.c:146 #3 0xffffffff804048d6 in atomic_notifier_call_chain (nh=<value optimized out>, val=0, v=0x0) at kernel/sys.c:231 #4 0xffffffff80231ec8 in panic (fmt=0xffffffff80469990 "Attempted to kill init!") at kernel/panic.c:99 #5 0xffffffff80234ff7 in do_exit (code=256) at kernel/exit.c:866 #6 0xffffffff80235886 in do_group_exit (exit_code=-2142501744) at kernel/exit.c:1042 #7 0xffffffff80235898 in sys_exit_group (error_code=<value optimized out>) at kernel/exit.c:1053 #8 0xffffffff80209cfe in system_call () #9 0x0000000000000246 in ?? () #10 0xffffffffffffffc0 in ?? () #11 0x00002b6a661146d0 in ?? () #12 0x00000000000000e7 in ?? () #13 0x00000000000000e7 in ?? () #14 0x0000000000000000 in ?? () and pressing "c" I don't see any progress in either the gdb console (I have enabled console messages through gdb but I have never seen any). THere are also no messages on the default console of the debug target. The debug target seems to be frozen early in the boot process: " Booting the kernel. Kernel Live. Kernel direct mapping tables [...] " Are serial devices initialized at this early point? More questions: 1) is this expected kgdb behaviour? if the kernel has panicked, is the panic becasue of kgdb or is it an unrelated kernel panic? 2) I also tried compiling serial kgdb support as a module, and not built-in. In this case I was expecting the kernel to boot normally and only when gdb connects to get a breakpoint. However I still get the same behaviour, i.e. the target kernel seems to freezes in the same spot. 3) with no kgdb at all, the kernel boots properly although the initial login console seems to be frozen (but I can connect e.g. remotely) 4) if you have another kernel version / kgdb patches combination that you 've managed to work with, please let me know. There is also a resent patch named sysrq_busfix http://www.uwsg.iu.edu/hypermail/linux/kernel/0802.1/0722.html but I don't know if this is relevant. I tried applying the sysrq_bugfix. patch from the kgdb repository but Iit didn't help. any help is greatly appreciated thanks! - Vasilis -- To unsubscribe from this list: send an email with "unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx Please read the FAQ at http://kernelnewbies.org/FAQ