* kgdb and console output
@ 2003-03-14 11:49 Ibon Gotxi Garcia
2003-03-14 17:25 ` Tom Rini
0 siblings, 1 reply; 4+ messages in thread
From: Ibon Gotxi Garcia @ 2003-03-14 11:49 UTC (permalink / raw)
To: Linux PPC embedded
caution: perhaps a bit offtopic?
Hi all:
I'm still having problems to debug a kernel with kgdb:
both kgdb and console output go to /dev/ttyS0 (no chance of changing
that, we use the second serial port for other purposes). I get an
initial break in gdb (development machine), and the kernel loads
smoothly (outputs are perfect) till it reaches init, when the output
goes mad, repeating everything (but the first char) a number of times.
For example:
INIT: INIT: NIT: IT: T: : version 2.78 bootingersion 2.78 bootingrsion
2.78 bootingsion 2.78 bootingon 2.78 booting
and so on.
a.- Is that a gdb problem?
b.- Is it related with using the same serial port for both output and
debugging?
c.- Maybe i should change the tools i use in the root filesystem (aka
/bin/echo ...)?
I have tried not using colors or scape sequences to print, but a simple
echo "echo this" produces the same problem.
Any ideas?
Many regards.
--
Ibon Gotxi Garcia <igotxi@jazzfree.com>
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: kgdb and console output
2003-03-14 11:49 kgdb and console output Ibon Gotxi Garcia
@ 2003-03-14 17:25 ` Tom Rini
2003-03-20 15:05 ` Ibon Gotxi Garcia
0 siblings, 1 reply; 4+ messages in thread
From: Tom Rini @ 2003-03-14 17:25 UTC (permalink / raw)
To: Ibon Gotxi Garcia; +Cc: Linux PPC embedded
On Fri, Mar 14, 2003 at 11:49:50AM +0000, Ibon Gotxi Garcia wrote:
[snip]
> INIT: INIT: NIT: IT: T: : version 2.78 bootingersion 2.78 bootingrsion
> 2.78 bootingsion 2.78 bootingon 2.78 booting
>
> and so on.
>
> a.- Is that a gdb problem?
> b.- Is it related with using the same serial port for both output and
> debugging?
> c.- Maybe i should change the tools i use in the root filesystem (aka
> /bin/echo ...)?
It's related to the 'console' support inside of the serial driver / kgdb
stub. The best way, IMHO, around this is to use the 'kgdb_demux'
script. I don't have the URL handy, but google knows.
--
Tom Rini
http://gate.crashing.org/~trini/
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: kgdb and console output
2003-03-14 17:25 ` Tom Rini
@ 2003-03-20 15:05 ` Ibon Gotxi Garcia
2003-03-20 15:09 ` Tom Rini
0 siblings, 1 reply; 4+ messages in thread
From: Ibon Gotxi Garcia @ 2003-03-20 15:05 UTC (permalink / raw)
To: Tom Rini; +Cc: Linux PPC embedded
On Fri, 2003-03-14 at 17:25, Tom Rini wrote:
> On Fri, Mar 14, 2003 at 11:49:50AM +0000, Ibon Gotxi Garcia wrote:
>
> [snip]
> > INIT: INIT: NIT: IT: T: : version 2.78 bootingersion 2.78 bootingrsion
> > 2.78 bootingsion 2.78 bootingon 2.78 booting
> >
>
> It's related to the 'console' support inside of the serial driver / kgdb
> stub. The best way, IMHO, around this is to use the 'kgdb_demux'
> script. I don't have the URL handy, but google knows.
I have found it in
http://linux.junsun.net/porting-howto/src/kdmx-1.02.tar.gz
but I'm still unable of making it work. I seems fine when the kernel is
loading, but it begins to do funny thing when we move to userland.
I think the hole point is character scape: GDB packets are
$data#checksum, so when some output (no debug output, just normal one)
is made to the console having '$', '#' or even '+' and '-', the kdmx
script goes mental.
I'm thinking in two possible solutions:
1.- Wait till kgdb has LAN support (gdb packets over udp, instead of
over the serial port).
2.- Patch the console driver (no idea how) to avoid printing '$' or '#'.
Probably a terrible hack, but perhaps useful for development.
Any idea about this?
Cheers.
Ibon.
>
> --
> Tom Rini
> http://gate.crashing.org/~trini/
>
--
Ibon Gotxi Garcia <igotxi@jazzfree.com>
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: kgdb and console output
2003-03-20 15:05 ` Ibon Gotxi Garcia
@ 2003-03-20 15:09 ` Tom Rini
0 siblings, 0 replies; 4+ messages in thread
From: Tom Rini @ 2003-03-20 15:09 UTC (permalink / raw)
To: Ibon Gotxi Garcia; +Cc: Linux PPC embedded
On Thu, Mar 20, 2003 at 03:05:18PM +0000, Ibon Gotxi Garcia wrote:
> On Fri, 2003-03-14 at 17:25, Tom Rini wrote:
> > On Fri, Mar 14, 2003 at 11:49:50AM +0000, Ibon Gotxi Garcia wrote:
> >
> > [snip]
> > > INIT: INIT: NIT: IT: T: : version 2.78 bootingersion 2.78 bootingrsion
> > > 2.78 bootingsion 2.78 bootingon 2.78 booting
> > >
>
> >
> > It's related to the 'console' support inside of the serial driver / kgdb
> > stub. The best way, IMHO, around this is to use the 'kgdb_demux'
> > script. I don't have the URL handy, but google knows.
>
> I have found it in
> http://linux.junsun.net/porting-howto/src/kdmx-1.02.tar.gz
>
> but I'm still unable of making it work. I seems fine when the kernel is
> loading, but it begins to do funny thing when we move to userland.
Is this 8xx or something else? For 8xx, currently console output ALWAYS
goes to KGDB, if KGDB is enabled. When the next 2.4.21-pre release
comes out, this behavior will change. I suspect 8260 behaves in a
similar manner, but I don't have the HW to test it, so I did not make a
similar change there.
--
Tom Rini
http://gate.crashing.org/~trini/
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2003-03-20 15:09 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-03-14 11:49 kgdb and console output Ibon Gotxi Garcia
2003-03-14 17:25 ` Tom Rini
2003-03-20 15:05 ` Ibon Gotxi Garcia
2003-03-20 15:09 ` Tom Rini
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).