Re: kgdb errors with serial console

From: Elvis Dowson
Date: Fri Oct 08 2010 - 06:42:11 EST


Hi Jason,
I'm getting eclipse target time outs, I've attached link to the video here : http://drop.io/kgdbwe01

On Oct 8, 2010, at 3:44 AM, Jason Wessel wrote:
>
> 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.

The agent-proxy suggestion was a lifesaver!! It makes it so much easier to debug the target board, and you can run it as a normal user when connecting to /dev/ttyUSB0.

I made the required changes to .gdbinit, and modified the Eclipse debugger settings to TCP/IP, with localhost and port 4441.

I also then go to the telnet terminal session, and then type

# echo g > /proc/sysrq-trigger
SysRq : DEBUG
Entering KGDB

and then launched eclipse debugger. It loads the vmlinux file, and a bunch of junk characters keep appearing continuously on the telnet session.

After about a minute or so, Eclipse terminates the session saying that it timed out. You can see this in the video. I edited the video, in between to trim off the long wait, with the characters scrolling in the terminal session, to the point where it crashes.

Best regards,

Elvis Dowson



--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/