next up previous contents index
Next: 13.18.2 gdb_serial_signal: primary event Up: 13.18 Serial-line Remote Debugging Previous: 13.18 Serial-line Remote Debugging

13.18.1 Redirecting console output to the remote debugger

 

If the machine on which the kernel is being debugged is truly ``remote,'' e.g., in a different room or a completely different building, and you don't have easy access to the machine's ``real'' console, it is possible to make the kernel use the remote debugger as its ``console'' for printing status messages and such. To do this, simply write your kernel's ``console'' output functions (e.g., putchar and puts, if you're using the OSKit's minimal C library for console output routines such as printf) so that they call gdb_serial_putchar and gdb_serial_puts, described in Sections 13.18.5 and 13.18.6, respectively. The OSKit base console environment (section 13.13) does this as necessary.

This mechanism only works for console output: console input cannot be obtained from the remote debugger's console because the GDB serial-line debugging protocol does not currently support it. However, console input can be obtained ``outside the protocol'' as described in section 13.18.4.



Utah Flux Research Group