All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jason Wessel <jason.wessel@windriver.com>
To: Elvis Dowson <elvis.dowson@mac.com>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Linux OMAP Mailing List <linux-omap@vger.kernel.org>
Subject: Re: kgdb errors with serial console
Date: Thu, 07 Oct 2010 17:37:42 -0500	[thread overview]
Message-ID: <4CAE4BB6.7080509@windriver.com> (raw)
In-Reply-To: <BDD07355-7199-4A2E-8426-F6D43EA5D313@mac.com>

On 10/07/2010 04:47 PM, Elvis Dowson wrote:
> Hi,
>         I'm getting the following errors when attempting to use kgdb with the serial console. Any idea how I can resolve this issue? 
>
> The correct serial parameters when I use kermit with the target board is 
>
> set flow-control off
> set carrier-watch none
> set speed 115200
>
> and it connects correctly.
>
> I'm not sure if the gdb configuration commands for the serial port are sufficient, and if there is a parameter that I am missing here. The host is connected to the target using an FTDI USB to serial converter, so it appears as /dev/ttyUSB0 on the host and as ttyS2 on the target.
>
> # su
> # cd /tool/patches/android-rowboat-froyo-2.2-patchwork/kernel
> # arm-angstrom-linux-gnueabi-gdb
> (gdb) file vmlinux
> Reading symbols from /tool/patches/android-rowboat-froyo-2.2-patchwork/kernel/vmlinux...done.
>
> (gdb) set remotebaud 115200
> (gdb) set remoteflow 0
> (gdb) set debug remote 1
> (gdb) set debug serial 1
>   
You don't want to use this one, it just tends to pollute the logs, "set
debug remote 1" should be enough.

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


Looks to me like you did not activate the kernel debugger before using
gdb to enter, because the gdb you are using is not going to send the
"sysrq g" sequence.


What you would want to do here is to "echo g > /proc/sysrq-trigger" with
your terminal program, disconnect and then try connecting the debugger
to the kernel.   Another option is to use the agent-proxy so you can
have a console connection and a debugger connection.

It would probably also be good to test if the debugger is working at all
on your serial port.

Configure the debugger with:
# echo ttyS2 > /sys/module/kgdboc/parameters/kgdboc
kgdb: Registered I/O driver kgdboc.
# echo g > /proc/sysrq-trigger
SysRq : DEBUG

And now to exit debugger you must blindly and perfectly type
$D#44+

Nothing will be echoed because at this stage the kernel serial polling
driver would just be collecting characters.

After typing that the kernel should return back to the running state and
print something like:
+$OK#9a#


Jason.





> Remote debugging using /dev/ttyUSB0
> Sending packet: $qSupported#37...[
> r +]Ack
> [$][q][S][u][p][p][o][r][t][e][d][#][3][7]Packet received: qSupported
> Packet qSupported (supported-packets) is supported
> warning: unrecognized item "qSupported" in "qSupported" response
> Sending packet: $Hg0#df...[+]Ack
> [$][H][g][0][#][d][f]Packet received: Hg0
> Sending packet: $?#3f...[+]Ack
> [$][?][#][3][f]Packet received: ?
> Sending packet: $Hc-1#09...[+]Ack
> [$][H][c][-][1][#][0][9]Packet received: Hc-1
> Sending packet: $qC#b4...[+]Ack
> [$][q][C][#][b][4]Packet received: qC
> Sending packet: $qAttached#8f...[+]Ack
> [$][q][A][t][t][a][c][h][e][d][#][8][f]Packet received: qAttached
> Packet qAttached (query-attached) is supported
> Sending packet: $qOffsets#4b...[+]Ack
> [$][q][O][f][f][s][\r][\r][\n][e][t][s][#][4][b]Bad checksum, sentsum=0x4b, csum=0x6f, buf=qOffs\r\r\nets
> [-][<Timeout: 2 seconds>]Timed out.
> [-][<Timeout: 2 seconds>]Timed out.
> Ignoring packet error, continuing...
> Malformed response to offset query, qOffs
> ets
> (gdb) 
>
>
> Best regards,
>
> Elvis Dowson
>
>
>   

  reply	other threads:[~2010-10-07 22:37 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-07 21:47 kgdb errors with serial console Elvis Dowson
2010-10-07 22:37 ` Jason Wessel [this message]
2010-10-07 22:55   ` Elvis Dowson
2010-10-07 23:07   ` Elvis Dowson
2010-10-07 23:44     ` Jason Wessel
2010-10-08 10:41       ` Elvis Dowson
2010-10-08 13:17         ` Jason Wessel
2010-10-08 21:36           ` Elvis Dowson
2010-10-08 22:07           ` Elvis Dowson
2010-10-08 22:33           ` Elvis Dowson
2010-10-09  0:05           ` Elvis Dowson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4CAE4BB6.7080509@windriver.com \
    --to=jason.wessel@windriver.com \
    --cc=elvis.dowson@mac.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.