diff options
author | bellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162> | 2005-04-26 20:42:36 +0000 |
---|---|---|
committer | bellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162> | 2005-04-26 20:42:36 +0000 |
commit | e90096763d74b1126cf502c2d710d64df5ecbb63 (patch) | |
tree | 8ddd7ea84a000d60f3b17a73cce36b9562f2fd3c /gdbstub.c | |
parent | 43fb823b5f89c6d716e2cbce603c6fb1ca6c0b2f (diff) |
report user mode gdb exit codes (Paul Brook)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1401 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'gdbstub.c')
-rw-r--r-- | gdbstub.c | 16 |
1 files changed, 16 insertions, 0 deletions
@@ -656,6 +656,22 @@ gdb_handlesig (CPUState *env, int sig) } return sig; } + +/* Tell the remote gdb that the process has exited. */ +void gdb_exit(CPUState *env, int code) +{ + GDBState *s; + char buf[4]; + + if (gdbserver_fd < 0) + return; + + s = &gdbserver_state; + + snprintf(buf, sizeof(buf), "W%02x", code); + put_packet(s, buf); +} + #else static int gdb_can_read(void *opaque) { |