Revision 0e1c9c54 gdbstub.c
b/gdbstub.c | ||
---|---|---|
2373 | 2373 |
} |
2374 | 2374 |
} |
2375 | 2375 |
|
2376 |
/* Tell the remote gdb that the process has exited. */ |
|
2377 |
void gdb_exit(CPUState *env, int code) |
|
2378 |
{ |
|
2379 |
GDBState *s; |
|
2380 |
char buf[4]; |
|
2381 |
|
|
2382 |
s = gdbserver_state; |
|
2383 |
if (!s) { |
|
2384 |
return; |
|
2385 |
} |
|
2386 |
#ifdef CONFIG_USER_ONLY |
|
2387 |
if (gdbserver_fd < 0 || s->fd < 0) { |
|
2388 |
return; |
|
2389 |
} |
|
2390 |
#endif |
|
2391 |
|
|
2392 |
snprintf(buf, sizeof(buf), "W%02x", (uint8_t)code); |
|
2393 |
put_packet(s, buf); |
|
2394 |
} |
|
2395 |
|
|
2376 | 2396 |
#ifdef CONFIG_USER_ONLY |
2377 | 2397 |
int |
2378 | 2398 |
gdb_queuesig (void) |
... | ... | |
2436 | 2456 |
return sig; |
2437 | 2457 |
} |
2438 | 2458 |
|
2439 |
/* Tell the remote gdb that the process has exited. */ |
|
2440 |
void gdb_exit(CPUState *env, int code) |
|
2441 |
{ |
|
2442 |
GDBState *s; |
|
2443 |
char buf[4]; |
|
2444 |
|
|
2445 |
s = gdbserver_state; |
|
2446 |
if (gdbserver_fd < 0 || s->fd < 0) |
|
2447 |
return; |
|
2448 |
|
|
2449 |
snprintf(buf, sizeof(buf), "W%02x", code); |
|
2450 |
put_packet(s, buf); |
|
2451 |
} |
|
2452 |
|
|
2453 | 2459 |
/* Tell the remote gdb that the process has exited due to SIG. */ |
2454 | 2460 |
void gdb_signalled(CPUState *env, int sig) |
2455 | 2461 |
{ |
Also available in: Unified diff