gdb_server: add debug signal reason prints
Added debug prints to show what is the target debug reason. Also added debug print for Ctrl-C response. This is useful for troubleshooting and log analysis. Change-Id: I055936257d989efe7255656198a8d73a367fcd15 Signed-off-by: Marek Vrbka <marek.vrbka@codasip.com> Reviewed-on: https://review.openocd.org/c/openocd/+/7720 Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com> Tested-by: jenkins
This commit is contained in:
committed by
Antonio Borneo
parent
370bf43fb1
commit
0854c83076
@@ -7147,3 +7147,29 @@ static int target_register_user_commands(struct command_context *cmd_ctx)
|
||||
|
||||
return register_commands(cmd_ctx, NULL, target_exec_command_handlers);
|
||||
}
|
||||
|
||||
const char *target_debug_reason_str(enum target_debug_reason reason)
|
||||
{
|
||||
switch (reason) {
|
||||
case DBG_REASON_DBGRQ:
|
||||
return "DBGRQ";
|
||||
case DBG_REASON_BREAKPOINT:
|
||||
return "BREAKPOINT";
|
||||
case DBG_REASON_WATCHPOINT:
|
||||
return "WATCHPOINT";
|
||||
case DBG_REASON_WPTANDBKPT:
|
||||
return "WPTANDBKPT";
|
||||
case DBG_REASON_SINGLESTEP:
|
||||
return "SINGLESTEP";
|
||||
case DBG_REASON_NOTHALTED:
|
||||
return "NOTHALTED";
|
||||
case DBG_REASON_EXIT:
|
||||
return "EXIT";
|
||||
case DBG_REASON_EXC_CATCH:
|
||||
return "EXC_CATCH";
|
||||
case DBG_REASON_UNDEFINED:
|
||||
return "UNDEFINED";
|
||||
default:
|
||||
return "UNKNOWN!";
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user