mirror of
https://github.com/mii443/qemu.git
synced 2025-12-16 17:18:49 +00:00
gdbstub: abstract target specific details from gdb_put_packet_binary
We unfortunately handle the checking of packet acknowledgement differently for user and softmmu modes. Abstract the user mode stuff behind gdb_got_immediate_ack with a stub for softmmu. Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Message-Id: <20230302190846.2593720-14-alex.bennee@linaro.org> Message-Id: <20230303025805.625589-14-richard.henderson@linaro.org>
This commit is contained in:
@@ -54,6 +54,25 @@ int gdb_get_char(void)
|
||||
return ch;
|
||||
}
|
||||
|
||||
bool gdb_got_immediate_ack(void)
|
||||
{
|
||||
int i;
|
||||
|
||||
i = gdb_get_char();
|
||||
if (i < 0) {
|
||||
/* no response, continue anyway */
|
||||
return true;
|
||||
}
|
||||
|
||||
if (i == '+') {
|
||||
/* received correctly, continue */
|
||||
return true;
|
||||
}
|
||||
|
||||
/* anything else, including '-' then try again */
|
||||
return false;
|
||||
}
|
||||
|
||||
void gdb_put_buffer(const uint8_t *buf, int len)
|
||||
{
|
||||
int ret;
|
||||
|
||||
Reference in New Issue
Block a user