http://www.mail-archive.com/kgdb-bugrep...@lists.sourceforge.net/msg02059.htmlRe: [Kgdb-bugreport] KGDB for linux kernel 2.6.26 and afterStuart Xu Hi Caz, The KGDB related flags in .config: CONFIG_HAVE_ARCH_KGDB=y CONFIG_KGDB=y CONFIG_KGDB_SERIAL_CONSOLE=y CONFIG_KGDB_8250=y CONFIG_KGDBOE=y CONFIG_KGDB_TESTS=y CONFIG_KGDB_TESTS_ON_BOOT=y CONFIG_KGDB_TESTS_BOOT_STRING="V2F100" the boot strig: title Fedora (2.6.27-kgdb_git_all) root (hd0,0) # kernel /vmlinuz-2.6.27-kgdb_git_all ro root=/dev/VolGroup00/LogVol00 rhgb quiet kernel /vmlinuz-2.6.27-kgdb_git_all ro root=/dev/VolGroup00/LogVol00 kgdbts= kgdb...@192.168.2.174/,@192.168.2.150/ kgdbwait # kernel /vmlinuz-2.6.27-kgdb_git_all ro root=/dev/VolGroup00/LogVol00 kgdbts= kgdboc=ttyS0,115200 kgdbwait # kernel /vmlinuz-2.6.27-kgdb_git_all ro root=/dev/VolGroup00/LogVol00 kgdbts= kgdb8250=ttyS0,115200 kgdbwait initrd /initrd-2.6.27-kgdb_git_all.img Please let me know if I missed anything. Thanks, Stuart ________________________________________ From: Caz Yokoyama [cazyokoy...@gmail.com] Sent: Wednesday, March 11, 2009 4:10 PM To: Stuart Xu Cc: kgdb-bugrep...@lists.sourceforge.net Subject: RE: [Kgdb-bugreport] KGDB for linux kernel 2.6.26 and after Hello Stuart, Show me your settings. Otherwise I can't answer your question. When I worked for it, ^C works fine on kgdboc. It is strange. 8250 is a serial chip which does not handle Ethernet. Regarding 2., you are debugging kernel. In other words, you are not debugging single thread user program. -caz -----Original Message----- From: Stuart Xu [mailto:s...@soleranetworks.com] Sent: Wednesday, March 11, 2009 2:44 PM To: Caz Yokoyama Cc: kgdb-bugrep...@lists.sourceforge.net Subject: RE: [Kgdb-bugreport] KGDB for linux kernel 2.6.26 and after Hi Caz, I installed the gdb-6.8-KgdbLight. I tested it on boot. It works fine on all three boot connections: kgdboc, kgdboe, and kgdb8250. The problems (maybe they are not problems) I found with this version of gdb, as well as the default gdb are: 1. when connect the gdb with the console, i.e. kgdboc is used, the gdb can connect to the target. After continue the execution, Ctrl-c can not stop the kernel execution any more. 2. when connect the gdb with the 8250 driver or ethernet, i.e kgdb8250 or kgdboe are used, the gdb can connect to the target and can stop the target execution with Ctrl-c. However, every time hit Ctrl-c, the gdb switch to a new thread and bt shows the same stack instead of the execution stack. Is this a problem? How can I check the execution context? Thanks, Sturat P.S. The following is the back traces when using ethernet connection and hit Ctrl-c and the kernel is 2.6.27 checked out from git.kernel.org repository: [r...@localhost linux-2.6-kgdb.git]# gdb-6.8-KgdbLight vmlinux GNU gdb 6.8 Copyright (C) 2008 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-redhat-linux-gnu"... (gdb) target remote udp:192.168.2.174:6443 warning: The remote protocol may be unreliable over UDP. Some events may be lost, rendering further debugging impossible. Remote debugging using udp:192.168.2.174:6443 kgdb_register_io_module (new_kgdb_io_ops=0xffffffff8151c340) at kernel/kgdb.c:1804 1804 wmb(); /* Sync point after breakpoint */ (gdb) bt #0 kgdb_register_io_module (new_kgdb_io_ops=0xffffffff8151c340) at kernel/kgdb.c:1804 #1 0xffffffff8122df17 in configure_kgdboe () at drivers/net/kgdboe.c:190 #2 0xffffffff8122df52 in init_kgdboe () at drivers/net/kgdboe.c:209 #3 0xffffffff8100a047 in do_one_initcall (fn=0xffffffff8122df39 <init_kgdboe>) at init/main.c:715 #4 0xffffffff815df693 in kernel_init (unused=<value optimized out>) at init/main.c:754 #5 0xffffffff81011699 in child_rip () at arch/x86/kernel/entry_64.S:1184 #6 0x0000000000000000 in ?? () (gdb) c Continuing. ^C[New Thread 716] Program received signal SIGTRAP, Trace/breakpoint trap. [Switching to Thread 716] kgdb_tasklet_bpt (ing=0) at kernel/kgdb.c:1804 1804 wmb(); /* Sync point after breakpoint */ (gdb) bt #0 kgdb_tasklet_bpt (ing=0) at kernel/kgdb.c:1804 #1 0xffffffff8104639f in tasklet_action (a=<value optimized out>) at kernel/softirq.c:386 #2 0xffffffff81046ab6 in __do_softirq () at kernel/softirq.c:208 #3 0xffffffff81011b7c in call_softirq () at arch/x86/kernel/entry_64.S:1355 #4 0xffffffff81012d82 in do_softirq () at arch/x86/kernel/irq_64.c:290 #5 0xffffffff8104668b in irq_exit () at kernel/softirq.c:284 #6 0xffffffff8101309e in do_IRQ (regs=0xffff88003d04bb28) at arch/x86/kernel/irq_64.c:215 #7 0xffffffff810108e3 in common_interrupt () at arch/x86/kernel/entry_64.S:694 #8 0xffff88003d04bb50 in ?? () #9 0x0000000000000000 in ?? () (gdb) (gdb) c Continuing. ^C[New Thread 1043] Program received signal SIGTRAP, Trace/breakpoint trap. [Switching to Thread 1043] kgdb_tasklet_bpt (ing=0) at kernel/kgdb.c:1804 1804 wmb(); /* Sync point after breakpoint */ (gdb) bt #0 kgdb_tasklet_bpt (ing=0) at kernel/kgdb.c:1804 #1 0xffffffff8104639f in tasklet_action (a=<value optimized out>) at kernel/softirq.c:386 #2 0xffffffff81046ab6 in __do_softirq () at kernel/softirq.c:208 #3 0xffffffff81011b7c in call_softirq () at arch/x86/kernel/entry_64.S:1355 #4 0xffffffff81012d82 in do_softirq () at arch/x86/kernel/irq_64.c:290 #5 0xffffffff8104668b in irq_exit () at kernel/softirq.c:284 #6 0xffffffff8101309e in do_IRQ (regs=0xffff88003dc6db18) at arch/x86/kernel/irq_64.c:215 #7 0xffffffff810108e3 in common_interrupt () at arch/x86/kernel/entry_64.S:694 #8 0xffff88003dc6db40 in ?? () #9 0x0000000000000000 in ?? () (gdb) |