[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v6 21/21] gdbstub: Clear unused variables in gdb_han
From: |
Jon Doron |
Subject: |
[Qemu-devel] [PATCH v6 21/21] gdbstub: Clear unused variables in gdb_handle_packet |
Date: |
Thu, 25 Apr 2019 16:26:36 +0300 |
Signed-off-by: Jon Doron <address@hidden>
---
gdbstub.c | 11 ++---------
1 file changed, 2 insertions(+), 9 deletions(-)
diff --git a/gdbstub.c b/gdbstub.c
index 8838241209..32aeefbbe6 100644
--- a/gdbstub.c
+++ b/gdbstub.c
@@ -2268,17 +2268,11 @@ static void handle_target_halt(GdbCmdContext *gdb_ctx,
void *user_ctx)
static int gdb_handle_packet(GDBState *s, const char *line_buf)
{
- const char *p;
- int ch;
- uint8_t mem_buf[MAX_PACKET_LENGTH];
- char buf[sizeof(mem_buf) + 1 /* trailing NUL */];
const GdbCmdParseEntry *cmd_parser = NULL;
trace_gdbstub_io_command(line_buf);
- p = line_buf;
- ch = *p++;
- switch(ch) {
+ switch(line_buf[0]) {
case '!':
put_packet(s, "OK");
break;
@@ -2495,8 +2489,7 @@ static int gdb_handle_packet(GDBState *s, const char
*line_buf)
break;
default:
/* put empty packet */
- buf[0] = '\0';
- put_packet(s, buf);
+ put_packet(s, "");
break;
}
--
2.20.1
- [Qemu-devel] [PATCH v6 11/21] gdbstub: Implement write memory (M pkt) with new infra, (continued)
- [Qemu-devel] [PATCH v6 11/21] gdbstub: Implement write memory (M pkt) with new infra, Jon Doron, 2019/04/25
- [Qemu-devel] [PATCH v6 12/21] gdbstub: Implement read memory (m pkt) with new infra, Jon Doron, 2019/04/25
- [Qemu-devel] [PATCH v6 13/21] gdbstub: Implement write all registers (G pkt) with new infra, Jon Doron, 2019/04/25
- [Qemu-devel] [PATCH v6 14/21] gdbstub: Implement read all registers (g pkt) with new infra, Jon Doron, 2019/04/25
- [Qemu-devel] [PATCH v6 15/21] gdbstub: Implement file io (F pkt) with new infra, Jon Doron, 2019/04/25
- [Qemu-devel] [PATCH v6 16/21] gdbstub: Implement step (s pkt) with new infra, Jon Doron, 2019/04/25
- [Qemu-devel] [PATCH v6 17/21] gdbstub: Implement v commands with new infra, Jon Doron, 2019/04/25
- [Qemu-devel] [PATCH v6 18/21] gdbstub: Implement generic query (q pkt) with new infra, Jon Doron, 2019/04/25
- [Qemu-devel] [PATCH v6 19/21] gdbstub: Implement generic set (Q pkt) with new infra, Jon Doron, 2019/04/25
- [Qemu-devel] [PATCH v6 20/21] gdbstub: Implement target halted (? pkt) with new infra, Jon Doron, 2019/04/25
- [Qemu-devel] [PATCH v6 21/21] gdbstub: Clear unused variables in gdb_handle_packet,
Jon Doron <=
- Re: [Qemu-devel] [PATCH v6 00/21] gdbstub: Refactor command packets handler, no-reply, 2019/04/25
- Re: [Qemu-devel] [PATCH v6 00/21] gdbstub: Refactor command packets handler, Alex Bennée, 2019/04/25