diff options
author | ths <ths@c046a42c-6fe2-441c-8c8c-71466251a162> | 2007-12-16 03:02:09 +0000 |
---|---|---|
committer | ths <ths@c046a42c-6fe2-441c-8c8c-71466251a162> | 2007-12-16 03:02:09 +0000 |
commit | 60fe76f38605e0e2eedb436d0945af283029c4e0 (patch) | |
tree | a3ede82bb8b80dc9170f1a241baf58bc3081ab62 /gdbstub.c | |
parent | Split block-raw.c into block-raw-posix.c and block-raw-win32.c, by (diff) | |
download | qemu-kvm-60fe76f38605e0e2eedb436d0945af283029c4e0.tar.gz qemu-kvm-60fe76f38605e0e2eedb436d0945af283029c4e0.tar.bz2 qemu-kvm-60fe76f38605e0e2eedb436d0945af283029c4e0.zip |
Fix wrong signedness, by Andre Przywara.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3815 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'gdbstub.c')
-rw-r--r-- | gdbstub.c | 14 |
1 files changed, 7 insertions, 7 deletions
@@ -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; |