Commit 3c07f8e89488c208391863cc7e26d106d7c0e46e
1 parent
72f341ed
Don't resume guest when gdb connection terminates and -S specified.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2343 c046a42c-6fe2-441c-8c8c-71466251a162
Showing
3 changed files
with
6 additions
and
4 deletions
gdbstub.c
... | ... | @@ -987,7 +987,8 @@ static void gdb_read(void *opaque) |
987 | 987 | qemu_del_vm_stop_handler(gdb_vm_stopped, s); |
988 | 988 | qemu_set_fd_handler(s->fd, NULL, NULL, NULL); |
989 | 989 | qemu_free(s); |
990 | - vm_start(); | |
990 | + if (autostart) | |
991 | + vm_start(); | |
991 | 992 | } else { |
992 | 993 | for(i = 0; i < size; i++) |
993 | 994 | gdb_read_byte(s, buf[i]); | ... | ... |
vl.c
... | ... | @@ -172,6 +172,7 @@ int daemonize = 0; |
172 | 172 | const char *option_rom[MAX_OPTION_ROMS]; |
173 | 173 | int nb_option_roms; |
174 | 174 | int semihosting_enabled = 0; |
175 | +int autostart = 1; | |
175 | 176 | |
176 | 177 | /***********************************************************/ |
177 | 178 | /* x86 ISA bus support */ |
... | ... | @@ -6530,7 +6531,6 @@ int main(int argc, char **argv) |
6530 | 6531 | const char *kernel_filename, *kernel_cmdline; |
6531 | 6532 | DisplayState *ds = &display_state; |
6532 | 6533 | int cyls, heads, secs, translation; |
6533 | - int start_emulation = 1; | |
6534 | 6534 | char net_clients[MAX_NET_CLIENTS][256]; |
6535 | 6535 | int nb_net_clients; |
6536 | 6536 | int optind; |
... | ... | @@ -6838,7 +6838,7 @@ int main(int argc, char **argv) |
6838 | 6838 | bios_dir = optarg; |
6839 | 6839 | break; |
6840 | 6840 | case QEMU_OPTION_S: |
6841 | - start_emulation = 0; | |
6841 | + autostart = 0; | |
6842 | 6842 | break; |
6843 | 6843 | case QEMU_OPTION_k: |
6844 | 6844 | keyboard_layout = optarg; |
... | ... | @@ -7254,7 +7254,7 @@ int main(int argc, char **argv) |
7254 | 7254 | { |
7255 | 7255 | /* XXX: simplify init */ |
7256 | 7256 | read_passwords(); |
7257 | - if (start_emulation) { | |
7257 | + if (autostart) { | |
7258 | 7258 | vm_start(); |
7259 | 7259 | } |
7260 | 7260 | } | ... | ... |
vl.h