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 18:44:00 -0500	[thread overview]
Message-ID: <4CAE5B40.3070701@windriver.com> (raw)
In-Reply-To: <7BA01CAF-DD25-4AB6-9498-8AB89E2EDDE1@mac.com>

On 10/07/2010 06:07 PM, Elvis Dowson wrote:
> On Oct 8, 2010, at 2:37 AM, Jason Wessel wrote:
>
>   
>> 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#
>>     
>
> Cool, I tried all the commands that you suggested and it worked perfectly. I got the same outputs. 
>
> So, if I understand correctly, I boot into the kernel without the kgbdwait option, and then manually launch the kgdb and then connect from Eclipse using gdb.
>
> The system waits at the root login prompt. 
>   

Probably just set a break point at sys_sync.

Of course if you are willing to try something a bit more complex you can
probably make use of being able to interactively break in with the
eclipse gdb plugin, assuming your serial port is connected to a linux
host, and it appeared that way based on your description.

On your host you could set up the following:


git clone git://git.kernel.org/pub/scm/utils/kernel/kgdb/agent-proxy.git
cd agent-proxy
make
./agent-proxy 4440^4441 0 /dev/ttyUSB0,115200 &

telnet localhost 4440

Now in your gdbinit file you replace the target remote with

target remote localhost:4441

The agent proxy should take care of sending the sysrq g for you, and the
telnet window will provide you a look at the target console.

Jason.


  reply	other threads:[~2010-10-07 23:44 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
2010-10-07 22:55   ` Elvis Dowson
2010-10-07 23:07   ` Elvis Dowson
2010-10-07 23:44     ` Jason Wessel [this message]
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=4CAE5B40.3070701@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.