aboutsummaryrefslogtreecommitdiff
path: root/gdbstub.c
diff options
context:
space:
mode:
authorths <ths@c046a42c-6fe2-441c-8c8c-71466251a162>2007-12-16 03:02:09 +0000
committerths <ths@c046a42c-6fe2-441c-8c8c-71466251a162>2007-12-16 03:02:09 +0000
commit60fe76f38605e0e2eedb436d0945af283029c4e0 (patch)
treea3ede82bb8b80dc9170f1a241baf58bc3081ab62 /gdbstub.c
parent223d4670a0cf539a0e8cc6a23aad28a8340dded8 (diff)
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.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/gdbstub.c b/gdbstub.c
index f877e02137..3ab89e9df4 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;