[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v10 19/20] gdbstub: Clear unused variables in gdb_ha
From: |
Jon Doron |
Subject: |
[Qemu-devel] [PATCH v10 19/20] gdbstub: Clear unused variables in gdb_handle_packet |
Date: |
Tue, 21 May 2019 12:59:47 +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 097b7d1231..9dd934a079 100644
--- a/gdbstub.c
+++ b/gdbstub.c
@@ -2270,17 +2270,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;
@@ -2497,8 +2491,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.21.0
- [Qemu-devel] [PATCH v10 06/20] gdbstub: Implement set_thread (H pkt) with new infra, (continued)
- [Qemu-devel] [PATCH v10 06/20] gdbstub: Implement set_thread (H pkt) with new infra, Jon Doron, 2019/05/21
- [Qemu-devel] [PATCH v10 05/20] gdbstub: Implement continue with signal (C pkt) with new infra, Jon Doron, 2019/05/21
- [Qemu-devel] [PATCH v10 07/20] gdbstub: Implement breakpoint commands (Z/z pkt) with new infra, Jon Doron, 2019/05/21
- [Qemu-devel] [PATCH v10 08/20] gdbstub: Implement set register (P pkt) with new infra, Jon Doron, 2019/05/21
- [Qemu-devel] [PATCH v10 09/20] gdbstub: Implement get register (p pkt) with new infra, Jon Doron, 2019/05/21
- [Qemu-devel] [PATCH v10 10/20] gdbstub: Implement write memory (M pkt) with new infra, Jon Doron, 2019/05/21
- [Qemu-devel] [PATCH v10 12/20] gdbstub: Implement write all registers (G pkt) with new infra, Jon Doron, 2019/05/21
- [Qemu-devel] [PATCH v10 13/20] gdbstub: Implement read all registers (g pkt) with new infra, Jon Doron, 2019/05/21
- [Qemu-devel] [PATCH v10 11/20] gdbstub: Implement read memory (m pkt) with new infra, Jon Doron, 2019/05/21
- [Qemu-devel] [PATCH v10 14/20] gdbstub: Implement file io (F pkt) with new infra, Jon Doron, 2019/05/21
- [Qemu-devel] [PATCH v10 19/20] gdbstub: Clear unused variables in gdb_handle_packet,
Jon Doron <=
- [Qemu-devel] [PATCH v10 15/20] gdbstub: Implement step (s pkt) with new infra, Jon Doron, 2019/05/21
- [Qemu-devel] [PATCH v10 16/20] gdbstub: Implement v commands with new infra, Jon Doron, 2019/05/21
- [Qemu-devel] [PATCH v10 20/20] gdbstub: Implement qemu physical memory mode, Jon Doron, 2019/05/21
- [Qemu-devel] [PATCH v10 18/20] gdbstub: Implement target halted (? pkt) with new infra, Jon Doron, 2019/05/21
- [Qemu-devel] [PATCH v10 17/20] gdbstub: Implement generic set/query (Q/q pkt) with new infra, Jon Doron, 2019/05/21
- Re: [Qemu-devel] [PATCH v10 00/20] gdbstub: Refactor command packets handler, Alex Bennée, 2019/05/23