From 60fe76f38605e0e2eedb436d0945af283029c4e0 Mon Sep 17 00:00:00 2001 From: ths Date: Sun, 16 Dec 2007 03:02:09 +0000 Subject: Fix wrong signedness, by Andre Przywara. git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3815 c046a42c-6fe2-441c-8c8c-71466251a162 --- gdbstub.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'gdbstub.c') diff --git a/gdbstub.c b/gdbstub.c index f877e02..3ab89e9 100644 --- a/gdbstub.c +++ b/gdbstub.c @@ -63,7 +63,7 @@ typedef struct GDBState { char line_buf[4096]; int line_buf_index; int line_csum; - char last_packet[4100]; + uint8_t last_packet[4100]; int last_packet_len; #ifdef CONFIG_USER_ONLY int fd; @@ -188,7 +188,7 @@ static void hextomem(uint8_t *mem, const char *buf, int len) static int put_packet(GDBState *s, char *buf) { int len, csum, i; - char *p; + uint8_t *p; #ifdef DEBUG_GDB printf("reply='%s'\n", buf); @@ -1179,7 +1179,7 @@ static void gdb_read_byte(GDBState *s, int ch) { CPUState *env = s->env; int i, csum; - char reply[1]; + uint8_t reply; #ifndef CONFIG_USER_ONLY if (s->last_packet_len) { @@ -1237,12 +1237,12 @@ static void gdb_read_byte(GDBState *s, int ch) csum += s->line_buf[i]; } if (s->line_csum != (csum & 0xff)) { - reply[0] = '-'; - put_buffer(s, reply, 1); + reply = '-'; + put_buffer(s, &reply, 1); s->state = RS_IDLE; } else { - reply[0] = '+'; - put_buffer(s, reply, 1); + reply = '+'; + put_buffer(s, &reply, 1); s->state = gdb_handle_packet(s, env, s->line_buf); } break; -- cgit v1.1