|
@@ -938,6 +938,7 @@ static bool process_string_cmd(const char *data,
|
|
|
|
|
|
for (i = 0; i < num_cmds; i++) {
|
|
|
const GdbCmdParseEntry *cmd = &cmds[i];
|
|
|
+ void *user_ctx = NULL;
|
|
|
g_assert(cmd->handler && cmd->cmd);
|
|
|
|
|
|
if ((cmd->cmd_startswith && !startswith(data, cmd->cmd)) ||
|
|
@@ -952,8 +953,12 @@ static bool process_string_cmd(const char *data,
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ if (cmd->need_cpu_context) {
|
|
|
+ user_ctx = (void *)gdbserver_state.g_cpu;
|
|
|
+ }
|
|
|
+
|
|
|
gdbserver_state.allow_stop_reply = cmd->allow_stop_reply;
|
|
|
- cmd->handler(params, NULL);
|
|
|
+ cmd->handler(params, user_ctx);
|
|
|
return true;
|
|
|
}
|
|
|
|