@@ -76,7 +76,7 @@
set_thread = ('H' any* @{cmd = SET_THREAD;});
- disconnect = ('D' @{cmd = DISCONNECT;}
+ detach = ('D' @{cmd = DETACH;}
xdigit+ $hex_digit %push);
# TODO: We don't actually listen to what's supported
@@ -94,7 +94,7 @@
commands = (get_mem | get_gprs | get_spr | stop_reason | set_thread |
q_attached | q_C | q_supported | qf_threadinfo | q_C |
- v_contq | v_contc | v_conts | put_mem | disconnect );
+ v_contq | v_contc | v_conts | put_mem | detach );
cmd = ((commands & ^'#'*) | ^'#'*) $crc
('#' xdigit{2} $hex_digit @end);
@@ -351,7 +351,7 @@ _match:
break;
case 11:
#line 79 "src/gdb_parser.rl"
- {cmd = DISCONNECT;}
+ {cmd = DETACH;}
break;
case 12:
#line 83 "src/gdb_parser.rl"
@@ -95,9 +95,9 @@ static void stop_reason(uint64_t *stack, void *priv)
send_response(fd, TRAP);
}
-static void disconnect(uint64_t *stack, void *priv)
+static void detach(uint64_t *stack, void *priv)
{
- PR_INFO("Terminating connection with client. pid %16" PRIi64 "\n", stack[0]);
+ PR_INFO("Detach debug session with client. pid %16" PRIi64 "\n", stack[0]);
send_response(fd, OK);
}
@@ -416,7 +416,7 @@ command_cb callbacks[LAST_CMD + 1] = {
v_conts,
put_mem,
interrupt,
- disconnect,
+ detach,
NULL};
int gdbserver_start(struct pdbg_target *thread, struct pdbg_target *adu, uint16_t port)
@@ -3,7 +3,7 @@
enum gdb_command {NONE, GET_GPRS, GET_SPR, GET_MEM,
STOP_REASON, SET_THREAD, V_CONTC, V_CONTS,
- PUT_MEM, INTERRUPT, DISCONNECT, LAST_CMD};
+ PUT_MEM, INTERRUPT, DETACH, LAST_CMD};
typedef void (*command_cb)(uint64_t *stack, void *priv);
void parser_init(command_cb *callbacks);
The detach command handler should not be named disconnect, because that is a different concept in gdb (disconnect leaves the target in the same state, detach ends the debugging session). Signed-off-by: Nicholas Piggin <npiggin@gmail.com> --- src/gdb_parser.rl | 4 ++-- src/gdb_parser_precompile.c | 2 +- src/pdbgproxy.c | 6 +++--- src/pdbgproxy.h | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-)