ubc: ignore breaks when no debug handler is set

This commit is contained in:
redoste 2023-06-04 17:51:08 +02:00
parent 9c22ecea8d
commit 0b7d8d6800
Signed by: redoste
SSH Key Fingerprint: SHA256:Y1z/cbVN8OVoFPXzVgklSqoZnyQQ/PQM8YwhMtxMk90
2 changed files with 4 additions and 5 deletions

View File

@ -19,8 +19,8 @@ void* ubc_getDBR(void);
The handler will backup the current CPU state and call ubc_debug_handler(). */
void ubc_dbh(void);
/* ubc_debug_handler(): C level UBC debug handler
The execution will be redirected to the handler set by the user or the add-in
will panic in case no handler has been set. */
The execution will be redirected to the handler set by the user or the break
will be ignored in case no handler has been set. */
void ubc_debug_handler(gdb_cpu_state_t* cpu_state);
/* ubc_set_debug_handler(): Set user debug handler
Set a custom debug handler that will be called when a break condition from

View File

@ -111,10 +111,9 @@ void ubc_debug_handler(gdb_cpu_state_t* cpu_state)
if (ubc_application_debug_handler != NULL) {
ubc_application_debug_handler(cpu_state);
} else {
// TODO : Should we add a custom panic code ?
gint_panic(-1);
}
// For now we will ignore breaks when no debug handler is set
// TODO : Should we log or panic when no debug handler is set ?
}
// TODO : Should we use the struct designed for GDB or make it more generic ?