next up previous contents index
Next: 10.18.7 gdb_serial_recv: vector to Up: 10.18 Serial-line Remote Debugging Previous: 10.18.5 gdb_serial_putchar: output a

10.18.6 gdb_serial_puts: output a line to the remote debugger's console

   

SYNOPSIS

#include <oskit/gdb_serial.h>

void gdb_serial_puts(const char *s);

DESCRIPTION

If a remote debugging connection is currently active, this function sends the specified string, followed by a newline character, to the remote debugger in a special ``output'' (`O') message which causes the line to be sent to the debugger's standard output. This allows the serial line used for remote debugging to double as a remote serial console, as described in Section 10.18.1.

If this function is called while no remote debugging connection is active, but the gdb_serial_send and gdb_serial_receive pointers are initialized to point to serial-line communication functions, then this function simply sends the specified line out the serial port using gdb_serial_send. This way, if the kernel attempts to print any messages before a connection has been established or after the connection has been dropped (e.g., by calling gdb_serial_exit), they won't confuse the debugger or cause the kernel to hang as they otherwise would, and they may be seen by the remote user if the serial port is being monitored at the time.

If the gdb_serial_send and gdb_serial_receive pointers are uninitialized (still NULL) when this function is called, it does nothing.

PARAMETERS

s
The string to send to the remote debugger's console. A newline is automatically appended to this string.

DEPENDENCIES

gdb_serial_send
10.18.8
gdb_serial_recv
10.18.7



University of Utah Flux Research Group