gdbstub: Only return E22 when reverse GDB is not supported

No need to keep processing the arguments when we know
reverse debugging is not available.

Signed-off-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com>
Reviewed-by: Daniel Henrique Barboza <daniel.barboza@oss.qualcomm.com>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Message-ID: <20260705215729.62196-8-philmd@oss.qualcomm.com>
This commit is contained in:
Philippe Mathieu-Daudé
2026-06-26 12:16:31 +02:00
parent 32822e3898
commit 82d97eeda8

View File

@@ -1378,6 +1378,7 @@ static void handle_backward(GArray *params, void *user_ctx)
{
if (!gdb_can_reverse()) {
gdb_put_packet("E22");
return;
}
if (params->len == 1) {
switch (gdb_get_cmd_param(params, 0)->opcode) {