linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* kgdb and mpc8xx (again)
@ 2003-03-10 17:42 Ibon Gotxi Garcia
  2003-03-10 21:04 ` Wolfgang Denk
  2003-03-11  0:56 ` Murray Jensen
  0 siblings, 2 replies; 3+ messages in thread
From: Ibon Gotxi Garcia @ 2003-03-10 17:42 UTC (permalink / raw)
  To: Linux PPC embedded


Hi:

I'm trying to debug a kernel on a 8xx board with kgdb, using the SMC1. I
have disabled all the outputs to the console made by the bootstrap code,
and simply running kermit, i get this line

$T0540:c0009db0;01:c01152fe;#b1

If i run ppc-linux-gdb instead of kermit, i get

0xc0009db0 in breakpoint () at ppc-stub.c:726

and the board restarts itself.

I have no idea why. Maybe:

1.- It's something related with some console output (don't know if
enabling kgdb disables all the console output in SMC1).
2.- A watchdog timeout happens (Does the kgdb code resets the
watchdog?).
3.- Do I have to do a "set endian xxx" in ppc-linux-gdb ??? (to get that
output i have done a "set endian big")


I'm using the denx kernel from the cvs and ppc-linux-gdb from ELDK 2.0.2
(on a x86 development machine)


Cheers
Ibon

--
Ibon Gotxi Garcia <igotxi@jazzfree.com>

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: kgdb and mpc8xx (again)
  2003-03-10 17:42 kgdb and mpc8xx (again) Ibon Gotxi Garcia
@ 2003-03-10 21:04 ` Wolfgang Denk
  2003-03-11  0:56 ` Murray Jensen
  1 sibling, 0 replies; 3+ messages in thread
From: Wolfgang Denk @ 2003-03-10 21:04 UTC (permalink / raw)
  To: Ibon Gotxi Garcia; +Cc: Linux PPC embedded


In message <1047318121.29389.44.camel@muse> you wrote:
>
> If i run ppc-linux-gdb instead of kermit, i get
>
> 0xc0009db0 in breakpoint () at ppc-stub.c:726
>
> and the board restarts itself.
>
> I have no idea why. Maybe:
>
> 1.- It's something related with some console output (don't know if
> enabling kgdb disables all the console output in SMC1).

No.

> 2.- A watchdog timeout happens (Does the kgdb code resets the
> watchdog?).

If your watchdog has not been disabled by the boot loader,  you  have
absolutely  no  chance to debug the system using kgdb. Either disable
the watchdog, or use a BDI2000.

> 3.- Do I have to do a "set endian xxx" in ppc-linux-gdb ??? (to get that

You don't.

> I'm using the denx kernel from the cvs and ppc-linux-gdb from ELDK 2.0.2
> (on a x86 development machine)

You should use ppc_8xx-gdb as documented.

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
Vulcans worship peace above all.
	-- McCoy, "Return to Tomorrow", stardate 4768.3

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: kgdb and mpc8xx (again)
  2003-03-10 17:42 kgdb and mpc8xx (again) Ibon Gotxi Garcia
  2003-03-10 21:04 ` Wolfgang Denk
@ 2003-03-11  0:56 ` Murray Jensen
  1 sibling, 0 replies; 3+ messages in thread
From: Murray Jensen @ 2003-03-11  0:56 UTC (permalink / raw)
  To: Ibon Gotxi Garcia; +Cc: Linux PPC embedded


On 10 Mar 2003 17:42:01 +0000, Ibon Gotxi Garcia <igotxi@jazzfree.com> writes:
>1.- It's something related with some console output (don't know if
>enabling kgdb disables all the console output in SMC1).

It's a long time since I've done this (I've got a bdi2000 now :-) but enabling
CONFIG_KGDB used to enable a call to breakpoint() in the early setup stuff -
and your output from ppc-linux-gdb seems to confirm this. I am surprised that
the board restarts itself - I suspect you are doing something with gdb e.g.
like quitting it (which will send a command to "kill" the running process -
which I think the kgdb stubs interpret as a restart).

Run your ppc-linux-gdb, and when you get the gdb prompt after the breakpoint()
line (I assume you get this), do a "continue" - the kernel should continue from
where it stopped. This breakpoint() gives you an opportunity to do some things
before the kernel gets into full swing (maybe set a breakpoint somewhere).

>2.- A watchdog timeout happens (Does the kgdb code resets the
>watchdog?).

Nothing can "reset" the watchdog (at least on 8xx and 8260) - it can only be
"set" or not - usually by the boot rom. Don't enable watchdog if you want
to use kgdb, unless you patch your kernel appropriately (you have to poke
the watchdog registers from within the kgdb serial code - I might be able
to dredge up some old patches that do this, if you want - but if you can
afford it, its better to buy a bdi2000).

>3.- Do I have to do a "set endian xxx" in ppc-linux-gdb ??? (to get that
>output i have done a "set endian big")

You shouldn't need to if your cross gdb is built correctly (and it will be
since you are using the denx stuff). Cheers!
								Murray...
--
Murray Jensen, CSIRO Manufacturing & Infra. Tech.      Phone: +61 3 9662 7763
Locked Bag No. 9, Preston, Vic, 3072, Australia.         Fax: +61 3 9662 7853
Internet: Murray.Jensen@csiro.au

Hymod project: http://www.msa.cmst.csiro.au/projects/Hymod/

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2003-03-11  0:56 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-03-10 17:42 kgdb and mpc8xx (again) Ibon Gotxi Garcia
2003-03-10 21:04 ` Wolfgang Denk
2003-03-11  0:56 ` Murray Jensen

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).