* Kernel Debugging
@ 2003-04-14 21:38 Yang, Bo
2003-04-14 23:18 ` Wolfgang Denk
0 siblings, 1 reply; 8+ messages in thread
From: Yang, Bo @ 2003-04-14 21:38 UTC (permalink / raw)
To: linuxppc-embedded
Hi Everyone,
I am trying to debug the linux kernel using remote GDB via serial port on
MPC8xxFADS board. I built the kernel (2.4.4 from denx) with "kernel
hacking-->Include kgdb kernel debugger" turned on. (I am not sure that
turning on this flag is enough to support kernel debugging).
I got a bunch of ????? marks on serial console once the kernel gets run from
"ppcboot", and then I start GDB with cmd "target remote /dev/ttyS0" on the
host. The GDB got messages like "Ignoring packet error, continuing..." and
then timeed out to close connection.
Who can tell me what I am missing? Is it possible to debug linux kernel
without any BDM/JTAG debugger?
Any useful feedbacks are appreciated.
Bo Yang
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Kernel Debugging
2003-04-14 21:38 Yang, Bo
@ 2003-04-14 23:18 ` Wolfgang Denk
0 siblings, 0 replies; 8+ messages in thread
From: Wolfgang Denk @ 2003-04-14 23:18 UTC (permalink / raw)
To: Yang, Bo; +Cc: linuxppc-embedded
In message <406B9D084FAFD4118C980008C79FADB901B57FF7@ALBMAIL> you wrote:
>
> I got a bunch of ????? marks on serial console once the kernel gets run from
> "ppcboot", and then I start GDB with cmd "target remote /dev/ttyS0" on the
> host. The GDB got messages like "Ignoring packet error, continuing..." and
> then timeed out to close connection.
This is usually an indication that you tried to rn the native (x86)
GDB which will not be anle to communicate with a PPC target. Please
use the PPC cross version of GDB instead (ppc_8xx-gdb).
Best regards,
Wolfgang Denk
--
Software Engineering: Embedded and Realtime Systems, Embedded Linux
Phone: (+49)-8142-4596-87 Fax: (+49)-8142-4596-88 Email: wd@denx.de
He had quite a powerful intellect, but it was as powerful like a
locomotive, and ran on rails and was therefore almost impossible to
steer. - Terry Pratchett, _Lords and Ladies_
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Kernel Debugging
[not found] <406B9D084FAFD4118C980008C79FADB901B57FF9@ALBMAIL>
@ 2003-04-15 15:38 ` Wolfgang Denk
0 siblings, 0 replies; 8+ messages in thread
From: Wolfgang Denk @ 2003-04-15 15:38 UTC (permalink / raw)
To: Yang, Bo; +Cc: linuxppc-embedded
Dear Bo Yang,
in message <406B9D084FAFD4118C980008C79FADB901B57FF9@ALBMAIL> you wrote:
>
> Thank you for your prompt reply.
You are welcome.
> Could you please tell me where I can get or how to build a PPC cross version
> of GDB.
You can download the latest version of our ELDK (Embedded Linux
Development Kit) from ftp://ftp.leo.org/pub/eldk/2.1.0/, please see
ftp://ftp.leo.org/pub/eldk/2.1.0/eldk-ppc-linux-x86/README.html or
http:www.denx.de/re/ELDK.html for detailed instructions.
> Also, I have following questions I can't find the answer:
> Is it enough just to include kgdb support when configuring kernel to build
> linux kernel with kgdb support?
> Has DENX's linux-2.4.4 kernel been patched with kgdb already or not?
Actually, we don't use kgdb. We use the Abatron BDI2000 for all
kernel and device driver debugging (on PPC, ARM, and MIPS).
> Are the ? marks shown on serial console when kernel built with kgdb support
> starts run supposed to see or some else?
kgdb will stop at a built-in breakpoint pretty early in the
initialization sequence to allow you to set more breakpoints for
example to debug drivers etc. It expects that you connect with a
debugger on the serial line.
Best regards,
Wolfgang Denk
--
Software Engineering: Embedded and Realtime Systems, Embedded Linux
Phone: (+49)-8142-4596-87 Fax: (+49)-8142-4596-88 Email: wd@denx.de
Systems programmers are the high priests of a low cult.
-- R.S. Barton
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 8+ messages in thread
* kernel debugging
@ 2006-05-03 14:11 Steve Iribarne (GMail)
2006-05-03 16:06 ` David Hawkins
2006-05-04 9:20 ` David H. Lynch Jr.
0 siblings, 2 replies; 8+ messages in thread
From: Steve Iribarne (GMail) @ 2006-05-03 14:11 UTC (permalink / raw)
To: linuxppc-embedded
Hello.
This is more a general question to see what others do out here. I am
begining to get sick of printk debugging. I work on two different PPC
boards. An 860 and 8260.
I want to get some feedback on the best kernel debugger to use. I
have been looking at three.
1. kgdb
2. kdb
3. UML
I am leaning towards kgdb, but before I jump in I thought I'd put this
out to the best group I could think of linuxppc. Because I am sure
most of you are using something! :)
Thanks.
-stv
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: kernel debugging
2006-05-03 14:11 kernel debugging Steve Iribarne (GMail)
@ 2006-05-03 16:06 ` David Hawkins
2006-05-04 9:20 ` David H. Lynch Jr.
1 sibling, 0 replies; 8+ messages in thread
From: David Hawkins @ 2006-05-03 16:06 UTC (permalink / raw)
To: Steve Iribarne (GMail); +Cc: linuxppc-embedded
> This is more a general question to see what others do out here. I am
> begining to get sick of printk debugging. I work on two different PPC
> boards. An 860 and 8260.
>
> I want to get some feedback on the best kernel debugger to use. I
> have been looking at three.
>
> 1. kgdb
> 2. kdb
> 3. UML
>
> I am leaning towards kgdb, but before I jump in I thought I'd put this
> out to the best group I could think of linuxppc. Because I am sure
> most of you are using something! :)
Hey Steve,
You've missed the most important one; a hardware debugger. I believe
most people using PPC use a BDI2000 from Abatron. They're about $3k.
I recently received one, but haven't had time to work on my PPC
stuff, so can't comment further. I'm sure everyone else on the
list will help with comments.
Note that if you use a bunch of different PPC cores, you need to
add $1k per core for the firmware uploads to the BDI2000. So if
you are working with say AMCC 440, Freescale e300/G2, e500, etc
you'll need a firmware image for each due to the debug core
differences (I guess).
The US distributor for the BDI2000 is Ultimate Solutions,
www.ultsol.com.
Cheers
Dave
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: kernel debugging
2006-05-03 14:11 kernel debugging Steve Iribarne (GMail)
2006-05-03 16:06 ` David Hawkins
@ 2006-05-04 9:20 ` David H. Lynch Jr.
2006-05-04 19:51 ` Steve Iribarne (GMail)
1 sibling, 1 reply; 8+ messages in thread
From: David H. Lynch Jr. @ 2006-05-04 9:20 UTC (permalink / raw)
To: Steve Iribarne (GMail); +Cc: linuxppc-embedded
Everyone has their own debugging style.
Engineers seem to like hardware debugging tools. I have used some
very fancy debugging hardware, but except for extremely rare instances
it is more work to get setup
and figure out what you are trying to do than inserting some
debugging and rebuilding.
My idea of debugging hardware is a port with an LED on it I can try
to blink.
I also only rarely use software debuggers.
Most of the time when things go off the rails the critical question
for me is Where did things go wrong. Once I know that usually the
problem is obvious and I do nto need dumps of variables or memory.
I also do development across numerous platforms, OS's and languages.
I need debugging tools and techniques that are broadly portable. A
hardware debugging tool might help with board bringup, but it would be
of little use
for web or perl programming. Investing time and capitol in highly
specialized tools or knowledge requires being narrowly focused to get a
worthwhile payback.
Regardless, I think debugging is a sort of religious preference. You
need to know who you are and what you need. Other peoples experience is
useful but should not be determinative.
Steve Iribarne (GMail) wrote:
> Hello.
>
> This is more a general question to see what others do out here. I am
> begining to get sick of printk debugging. I work on two different PPC
> boards. An 860 and 8260.
>
> I want to get some feedback on the best kernel debugger to use. I
> have been looking at three.
>
> 1. kgdb
> 2. kdb
> 3. UML
>
> I am leaning towards kgdb, but before I jump in I thought I'd put this
> out to the best group I could think of linuxppc. Because I am sure
> most of you are using something! :)
>
> Thanks.
>
> -stv
> _______________________________________________
> Linuxppc-embedded mailing list
> Linuxppc-embedded@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-embedded
>
--
Dave Lynch DLA Systems
Software Development: Embedded Linux
717.627.3770 dhlii@dlasys.net http://www.dlasys.net
fax: 1.253.369.9244 Cell: 1.717.587.7774
Over 25 years' experience in platforms, languages, and technologies too numerous to list.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: kernel debugging
2006-05-04 9:20 ` David H. Lynch Jr.
@ 2006-05-04 19:51 ` Steve Iribarne (GMail)
2006-05-04 20:13 ` Mark Chambers
0 siblings, 1 reply; 8+ messages in thread
From: Steve Iribarne (GMail) @ 2006-05-04 19:51 UTC (permalink / raw)
To: dhlii; +Cc: linuxppc-embedded
On 5/4/06, David H. Lynch Jr. <dhlii@dlasys.net> wrote:
> Everyone has their own debugging style.
>
> Engineers seem to like hardware debugging tools. I have used some
> very fancy debugging hardware, but except for extremely rare instances
> it is more work to get setup
> and figure out what you are trying to do than inserting some
> debugging and rebuilding.
>
> My idea of debugging hardware is a port with an LED on it I can try
> to blink.
>
> I also only rarely use software debuggers.
>
> Most of the time when things go off the rails the critical question
> for me is Where did things go wrong. Once I know that usually the
> problem is obvious and I do nto need dumps of variables or memory.
>
> I also do development across numerous platforms, OS's and languages.
> I need debugging tools and techniques that are broadly portable. A
> hardware debugging tool might help with board bringup, but it would be
> of little use
> for web or perl programming. Investing time and capitol in highly
> specialized tools or knowledge requires being narrowly focused to get a
> worthwhile payback.
>
> Regardless, I think debugging is a sort of religious preference. You
> need to know who you are and what you need. Other peoples experience is
> useful but should not be determinative.
>
Yes I am finding this out. It's a long journey! :)
Most of the issues I have to deal with are systems that are already up
and running in the PPC world and I come in afterwords to clean up. So
for example, right now I think I have a DMA problem that is crashing
my PPC and rebooting the system.
To be sure, I would love to step over a few instructions and slow the
world down a bit. That's why I was going to setup kgdb or something
like that.
Thanks.
-stv
> Steve Iribarne (GMail) wrote:
> > Hello.
> >
> > This is more a general question to see what others do out here. I am
> > begining to get sick of printk debugging. I work on two different PPC
> > boards. An 860 and 8260.
> >
> > I want to get some feedback on the best kernel debugger to use. I
> > have been looking at three.
> >
> > 1. kgdb
> > 2. kdb
> > 3. UML
> >
> > I am leaning towards kgdb, but before I jump in I thought I'd put this
> > out to the best group I could think of linuxppc. Because I am sure
> > most of you are using something! :)
> >
> > Thanks.
> >
> > -stv
> > _______________________________________________
> > Linuxppc-embedded mailing list
> > Linuxppc-embedded@ozlabs.org
> > https://ozlabs.org/mailman/listinfo/linuxppc-embedded
> >
>
>
> --
> Dave Lynch DLA Systems
> Software Development: Embedded Linux
> 717.627.3770 dhlii@dlasys.net http://www.dlasys.net
> fax: 1.253.369.9244 Cell: 1.717.587.7774
> Over 25 years' experience in platforms, languages, and technologies too n=
umerous to list.
>
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: kernel debugging
2006-05-04 19:51 ` Steve Iribarne (GMail)
@ 2006-05-04 20:13 ` Mark Chambers
0 siblings, 0 replies; 8+ messages in thread
From: Mark Chambers @ 2006-05-04 20:13 UTC (permalink / raw)
To: Steve Iribarne (GMail); +Cc: linuxppc-embedded
>> >
>> > This is more a general question to see what others do out here. I am
>> > begining to get sick of printk debugging. I work on two different PPC
>> > boards. An 860 and 8260.
>> >
>> > I want to get some feedback on the best kernel debugger to use. I
>> > have been looking at three.
>> >
>> > 1. kgdb
>> > 2. kdb
>> > 3. UML
>> >
For the 860 you can purchase a hardware debugger from www.denx.de for
50 Euros. For the 8260 you must buy the more expensive BDI2000, but
that is Freescale's fault. But the look and feel of BDI2000 is the same as
BDI4GDB, just faster, so you can decide whether it's worth the money for
you.
When you say 'kgdb' you imply 'gdb' which is the standard GNU-world
debugger. kgdb is a means for letting a kernel communicate with a PC based
(or equivalent) gdb and is an alternative to a hardware debugger. Also,
check out ddd, a front end for gdb.
IMHO, these serial debugging ports on PPC are the greatest thing since
sliced
bread and it would be foolish not to take advantage of them.
Mark C.
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2006-05-05 1:35 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-05-03 14:11 kernel debugging Steve Iribarne (GMail)
2006-05-03 16:06 ` David Hawkins
2006-05-04 9:20 ` David H. Lynch Jr.
2006-05-04 19:51 ` Steve Iribarne (GMail)
2006-05-04 20:13 ` Mark Chambers
[not found] <406B9D084FAFD4118C980008C79FADB901B57FF9@ALBMAIL>
2003-04-15 15:38 ` Kernel Debugging Wolfgang Denk
-- strict thread matches above, loose matches on Subject: below --
2003-04-14 21:38 Yang, Bo
2003-04-14 23:18 ` Wolfgang Denk
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).