Remote GDB serial debugging?

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
nullify

Remote GDB serial debugging?

Post by nullify »

Has anyone gotten remote gdb debugging to work properly over a serial cable? Currently my only reference on how this would be done is here:
http://www.acm.uiuc.edu/sigops/roll_your_own/2.c.html

So I follow the instructions, and get to the stage where the host machine needs to connect to the test machine. The kernel (on the test machine) triggers an INT 03h (breakpoint exception). On my host machine, I then whip up gdb and and type "target remote /dev/ttyS0" at the gdb prompt. Unfortunately gdb can't seem to initiate a connection. :-(

The only thing I'm not sure about is when the website says to "setup the serial port to run at 9600 bps, 8/N/1, raw." Does anyone know how to reconfigure the serial port like this in Linux?

Any help is appreciated.
Parabola1

Re:Remote GDB serial debugging?

Post by Parabola1 »

nullify wrote: The only thing I'm not sure about is when the website says to "setup the serial port to run at 9600 bps, 8/N/1, raw." Does anyone know how to reconfigure the serial port like this in Linux?
use the "stty" command. do a "man stty" for syntax.
Post Reply