"Embedding with GNU: the gdb Remote Serial Protocol"
http://www.huihoo.org/mirrors/pub/embed/document/debugger/ew_GDB_RSP.pdfhttp://www.eetindia.co.in/STATIC/PDF/199911/EEIOL_1999NOV03_EMS_EDA_TEST_TA.pdf?SOURCES=DOWNLOAD"
Other commands
Console output (“O”)—optional
Example:
$O48656c6c6f2c20776f726c64210a#55
(Prints “Hello, world!\n” on the gdb
console)
This command allows a debugging
stub to send a text message to the gdb
console. The text to be displayed is
sent in its hex byte equivalent (‘H’ ==
0x48) and gdb will queue successive
messages until it sees a newline (‘\n’,
0x0a) character.
This message always originates in
the debugging target; gdb never sends
a console output message to the
debugging target.
"
-------------
Implementing a Debugging Agent for the GNU Debugger
http://neptune.billgatliff.com/debugger.html"
Console Output (O)
Sent by the target to request output at the gdb console. There is currently no corresponding strategy for gdb to request target console output, or for either gdb or a target to simulate console input.
The argument to this message is a string of data encoded as two-byte hex. Gdb will not display the message until a newline, 0x0a, is received.
The following example sends a "Hello, world!\n" message to the gdb console. Gdb does not respond to this message, other than message acknowledgement.
[target] $O48656c6c6f2c20776f726c64210a#55
[gdb]
"
I'm thinking of using this command to implement the methods gdb_putc(int c), gdb_puts(char * str) and gdb_printf (...).
I think it should not be difficult to add the command 'gdb console' to ptpcam.
This new command can be listening on port 23 (or another set).
So we can easily use telnet to connect to camera console.