X-Git-Url: https://review.openocd.org/gitweb?a=blobdiff_plain;f=src%2Fserver%2Fgdb_server.c;h=0baf7553b21c29105180bc25d8191578caf3545b;hb=0854c83076749196603bebdb47ec93f50a454f79;hp=943fe4008835bd303e31a31e807334963c8343d0;hpb=370bf43fb1a89d4bf3887cba63318e5e1711478b;p=openocd.git diff --git a/src/server/gdb_server.c b/src/server/gdb_server.c index 943fe40088..0baf7553b2 100644 --- a/src/server/gdb_server.c +++ b/src/server/gdb_server.c @@ -145,6 +145,9 @@ static char gdb_running_type; static int gdb_last_signal(struct target *target) { + LOG_TARGET_DEBUG(target, "Debug reason is: %s", + target_debug_reason_str(target->debug_reason)); + switch (target->debug_reason) { case DBG_REASON_DBGRQ: return 0x2; /* SIGINT */ @@ -159,8 +162,9 @@ static int gdb_last_signal(struct target *target) case DBG_REASON_NOTHALTED: return 0x0; /* no signal... shouldn't happen */ default: - LOG_USER("undefined debug reason %d - target needs reset", - target->debug_reason); + LOG_USER("undefined debug reason %d (%s) - target needs reset", + target->debug_reason, + target_debug_reason_str(target->debug_reason)); return 0x0; } } @@ -798,6 +802,7 @@ static void gdb_signal_reply(struct target *target, struct connection *connectio } if (gdb_connection->ctrl_c) { + LOG_TARGET_DEBUG(target, "Responding with signal 2 (SIGINT) to debugger due to Ctrl-C"); signal_var = 0x2; } else signal_var = gdb_last_signal(ct);