subsys/debug/gdb_server.c
/**
 * @brief stop mode agent BP/trace handler
 *
 * Common handler of breakpoint and trace mode exceptions.
 * It is invoked with interrupts locked.
 *
 * @return n/a
 */
@brief stop mode agent BP/trace handler
Common handler of breakpoint and trace mode exceptions.
It is invoked with interrupts locked.

@return n/a
@brief stop mode agent BP / trace handler Common handler of breakpoint and trace mode exceptions . It is invoked with interrupts locked . @return n / a
void gdb_handler(enum gdb_exc_mode mode, void *esf, int signal)
{
	gdb_arch_regs_from_esf(&gdb_regs, (NANO_ESF *)esf);
	valid_registers = 1;
	if (mode == GDB_EXC_TRACE) {
		if (gdb_debug_status != SINGLE_STEP) {
			return;
		}
		gdb_debug_status = DEBUGGING;
		disable_trace_mode();
	}
	event_is_pending = 1;
	cpu_stop_signal = signal;
	control_loop();
	gdb_arch_regs_to_esf(&gdb_regs, (NANO_ESF *)esf);
	RESUME_SYSTEM();
}
void gdb_handler ( enum gdb_exc_mode mode , void * esf , int signal ) { gdb_arch_regs_from_esf ( & gdb_regs , ( NANO_ESF * ) esf ) ; valid_registers = 1 ; if ( mode == GDB_EXC_TRACE ) { if ( gdb_debug_status != SINGLE_STEP ) { return ; } gdb_debug_status = DEBUGGING ; disable_trace_mode ( ) ; } event_is_pending = 1 ; cpu_stop_signal = signal ; control_loop ( ) ; gdb_arch_regs_to_esf ( & gdb_regs , ( NANO_ESF * ) esf ) ; RESUME_SYSTEM ( ) ; }
@brief stop mode agent BP/trace handler
 Common handler of breakpoint and trace mode exceptions.
@brief stop mode agent BP / trace handler Common handler of breakpoint and trace mode exceptions .
/* Save BP/Trace handler registers */ /* Check if GDB did request a step */ /* No longer pending trace mode exception */ /* Enter stop mode agent control loop */ /* Restore BP handler registers */ /* Resume system if not handling a single step */