LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware > Linux - Embedded & Single-board computer
User Name
Password
Linux - Embedded & Single-board computer This forum is for the discussion of Linux on both embedded devices and single-board computers (such as the Raspberry Pi, BeagleBoard and PandaBoard). Discussions involving Arduino, plug computers and other micro-controller like devices are also welcome.

Notices


Reply
  Search this Thread
Old 08-10-2009, 09:10 AM   #1
Raydan
LQ Newbie
 
Registered: Aug 2009
Posts: 1

Rep: Reputation: 0
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
 
Old 08-11-2009, 10:08 AM   #2
droneprime
LQ Newbie
 
Registered: Aug 2008
Location: /dev/null
Distribution: Gentoo at home. Everything at work.
Posts: 24

Rep: Reputation: 15
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
linux kernel crash and debugging chiru@chiru Linux - Newbie 0 10-11-2008 12:15 AM
Difference between kernel - debugging and application debugging topworld Linux - Software 2 03-30-2006 12:50 AM
Visual Debugging and Linux Kernel Debugging Igor007 Programming 0 09-30-2005 10:33 AM
Kernel Linux Debugging Igor007 Programming 2 09-05-2005 02:10 PM
Linux kernel debugging and Linux kernel module programming Igor007 Programming 2 08-13-2005 05:12 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware > Linux - Embedded & Single-board computer

All times are GMT -5. The time now is 10:23 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration