#include <oskit/gdb.h>extern void (*gdb_signal )(int *inout_signo, struct gdb_state *inout_gdb_state);
Before gdb_trap is called for the first time, this function pointer must be initialized to point to an appropriate GDB debugging stub, such as gdb_serial_signal (see Section 10.18.2). This function is called to notify the remote debugger that a relevant processor trap or interrupt has occurred, and to wait for further instructions from the remote debugger. When the function returns, execution will be resumed as described in Section 10.17.5.
- inout_signo
- On entry, the variable referenced by this pointer contains the signal number to transmit to the remote debugger. On return, this variable may have been modified to indicate what signal should be dispatched to the program being debugged. For example, if the variable is the same on return as on entry, then it means the remote debugger instructed the stub to ``pass through'' the signal to the application. If *signo is 0 on return from this function, it means the remote debugger has ``consumed'' the signal and execution of the subject program should be resumed immediately.
- inout_gdb_state
- On entry, this structure contains a snapshot of the processor state at the time the relevant trap or interrupt occurred. On return, the remote debugger may have modified this state; the new state should be used when resuming execution.