#include <oskit/gdb_serial.h>int gdb_serial_getchar(void);
static char inbuf[256];
Unfortunately, the GDB protocol doesn't support console input. However, we can simulate it with a rather horrible kludge: when the kernel first does a read from the console we take a breakpoint, allowing the user to fill an input buffer with a command such as:call strcpy(inbuf, "hello")
The supplied characters will be returned from successive calls to gdb_serial_getchar, until inbuf is emptied, at which point we hit a breakpoint again.
Returns the next available character in the inbuf array.
- gdb_breakpoint
- 10.17.11
- base_critical_enter
- 10.2.5
- base_critical_leave
- 10.2.5