LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Embedded & Single-board computer (https://www.linuxquestions.org/questions/linux-embedded-and-single-board-computer-78/)
-   -   Linux kernel debugging on ARM9 LPC3250 (https://www.linuxquestions.org/questions/linux-embedded-and-single-board-computer-78/linux-kernel-debugging-on-arm9-lpc3250-746442/)

Raydan 08-10-2009 09:10 AM

Linux kernel debugging on ARM9 LPC3250
 
Hello,

I'm trying to debug Linux kernel using KGDB:
- kernel was built with debugging symbols support, KGDB support, serial port driver support etc
- laptop running Debian GNU/Linux connected with Serial-To-Usb cable (/dev/ttyUSB0 at laptop, /dev/ttyS0 at the board)
- kernel boot args: console=ttyS0,115200n81 root=/dev/nfs rw nfsroot=192.168.0.7:/home/raydan/ltib/rootfs ip=192.168.0.10 init=/sbin/init kgdboc=ttyS0,115200

In minicom session after shell prompt I enter 'Ctrl+Alt+F+G' and get:
Quote:

SysRq : GDB
Entering KGDB
Then on the laptop I execute 'gdb vmlinux', then in gdb 'set remotebaud 115200' and 'target remote /dev/ttyUSB0'. Output is:
Quote:

Remote debugging using /dev/ttyUSB0
0x00000007 in start () at arch/arm/boot/compressed/head.S:101
101 #ifdef DEBUG
Current language: auto; currently asm
Looks like debugging initializes fine, but when I execute 'next' gdb command to step over kernel, gdb prints:
Quote:

warning: Invalid remote reply:
Then board console prints nothing, laptop gdb just hangs.

Could anybody help with this trouble?

--
Best Regards,
Dmitry Vinokurov

droneprime 08-11-2009 10:08 AM

What happens if you use 'continue' instead of 'next'?

You also might want to try using 'kgdbwait' as one of the boot parameters too. That will make the target kernel hang as though you tripped the MagicKey, without you having to press the MagicKey.


All times are GMT -5. The time now is 09:34 AM.