using gdb/kgdb

Jenkins, Clive Clive.Jenkins at xerox.com
Mon Feb 26 20:51:46 EST 2007


Hi Charles

> The kernel is compiled with CONFIG_DEBUG_KERNEL, CONFIG_KGDB,
> CONFIG_KGDB_TTYS1 all defined and I can boot it to the point
> where it is waiting for a gdb connection and it does make a
> connection. I have kernel command line that contains
> "kgdb=ttyS1,115200,halt kgdbwait" in it and this appears to
> be working fine and the output looks like this.
> 
> MMU:enterJCSSU'ëinit
> MMU:mapin
> MMU:setio
> MMU:exit
> begin start_kernel
> setup_arch: enter
> setup_arch: kgdb breakpoint
> 
> At this point, from the cross-compiled gdb on a host, if I
> invoke gdb with vmlinux as an argument, the PC is zero.
> 
> $ ppc-gdb vmlinux
> 
> (gdb)set remotebaud 115200
> 
At this point, try setting the architecture as below (you can
show the current architecture first, to check that it is
wrongly set to "e500", which doesn't work properly)

(gdb) show architecture
The target architecture is set automatically (currently powerpc:e500)

(gdb) set architecture powerpc:common
The target architecture is assumed to be powerpc:common

> (gdb)target remote /dev/ttyUSB0
> ...

More explanation can be found here:
http://www.ultsol.com/faq_p311.htm
[I would prefer to reference an explanation on this
mailing list, but I did not find one.]

I hope this solves your problem.

Clive



More information about the Linuxppc-embedded mailing list