Revision 60fe76f3 gdbstub.c

b/gdbstub.c
63 63
    char line_buf[4096];
64 64
    int line_buf_index;
65 65
    int line_csum;
66
    char last_packet[4100];
66
    uint8_t last_packet[4100];
67 67
    int last_packet_len;
68 68
#ifdef CONFIG_USER_ONLY
69 69
    int fd;
......
188 188
static int put_packet(GDBState *s, char *buf)
189 189
{
190 190
    int len, csum, i;
191
    char *p;
191
    uint8_t *p;
192 192

  
193 193
#ifdef DEBUG_GDB
194 194
    printf("reply='%s'\n", buf);
......
1179 1179
{
1180 1180
    CPUState *env = s->env;
1181 1181
    int i, csum;
1182
    char reply[1];
1182
    uint8_t reply;
1183 1183

  
1184 1184
#ifndef CONFIG_USER_ONLY
1185 1185
    if (s->last_packet_len) {
......
1237 1237
                csum += s->line_buf[i];
1238 1238
            }
1239 1239
            if (s->line_csum != (csum & 0xff)) {
1240
                reply[0] = '-';
1241
                put_buffer(s, reply, 1);
1240
                reply = '-';
1241
                put_buffer(s, &reply, 1);
1242 1242
                s->state = RS_IDLE;
1243 1243
            } else {
1244
                reply[0] = '+';
1245
                put_buffer(s, reply, 1);
1244
                reply = '+';
1245
                put_buffer(s, &reply, 1);
1246 1246
                s->state = gdb_handle_packet(s, env, s->line_buf);
1247 1247
            }
1248 1248
            break;

Also available in: Unified diff