diff options
author | Avi Kivity <avi@redhat.com> | 2010-06-21 18:07:45 +0300 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2010-06-21 18:07:45 +0300 |
commit | 6de75b40ade8b7eac6539c5d62cf14114268f667 (patch) | |
tree | 1f6d749e5ce1977302773ab37ebc431ff7bb74d4 /gdbstub.c | |
parent | 037b8f204645989788be2ef084b12ccb83fb8e56 (diff) | |
parent | 9605111958173938ac08298f515d55e937d0211c (diff) |
Merge commit '9605111958173938ac08298f515d55e937d0211c' into upstream-merge
* commit '9605111958173938ac08298f515d55e937d0211c':
ioapic: convert to qdev
ioapic: unexport ioapic_set_irq
Usermode exec-stack fix
Strace mprotect flags.
GDB exit status for semihosting
cris: Move sign extension.
cris: Centralize fetching
cris: Make the CRISv32 insn decoders return signed int.
tcg: Optionally sign-extend 32-bit arguments for 64-bit hosts.
Fix comparison which always returned false
xen: Fix build error due to missing include
block: fix a warning and possible truncation
Correct definitions for FD_CMD_SAVE and FD_CMD_RESTORE
Conflicts:
hw/ioapic.c
hw/pc_piix.c
Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'gdbstub.c')
-rw-r--r-- | gdbstub.c | 34 |
1 files changed, 20 insertions, 14 deletions
@@ -2374,6 +2374,26 @@ static void gdb_read_byte(GDBState *s, int ch) } } +/* Tell the remote gdb that the process has exited. */ +void gdb_exit(CPUState *env, int code) +{ + GDBState *s; + char buf[4]; + + s = gdbserver_state; + if (!s) { + return; + } +#ifdef CONFIG_USER_ONLY + if (gdbserver_fd < 0 || s->fd < 0) { + return; + } +#endif + + snprintf(buf, sizeof(buf), "W%02x", (uint8_t)code); + put_packet(s, buf); +} + #ifdef CONFIG_USER_ONLY int gdb_queuesig (void) @@ -2437,20 +2457,6 @@ 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]; - - s = gdbserver_state; - if (gdbserver_fd < 0 || s->fd < 0) - return; - - snprintf(buf, sizeof(buf), "W%02x", code); - put_packet(s, buf); -} - /* Tell the remote gdb that the process has exited due to SIG. */ void gdb_signalled(CPUState *env, int sig) { |