From: pbrook Date: Sun, 21 Jan 2007 16:47:01 +0000 (+0000) Subject: Don't resume guest when gdb connection terminates and -S specified. X-Git-Tag: release_0_9_1~1552 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=8027711d390e35ac43ed24f520d7c8f91ec0574a;p=qemu-xen-3.3-testing.git Don't resume guest when gdb connection terminates and -S specified. --- diff --git a/gdbstub.c b/gdbstub.c index 9015d625..2311a6c0 100644 --- a/gdbstub.c +++ b/gdbstub.c @@ -987,7 +987,8 @@ static void gdb_read(void *opaque) qemu_del_vm_stop_handler(gdb_vm_stopped, s); qemu_set_fd_handler(s->fd, NULL, NULL, NULL); qemu_free(s); - vm_start(); + if (autostart) + vm_start(); } else { for(i = 0; i < size; i++) gdb_read_byte(s, buf[i]); diff --git a/vl.c b/vl.c index 9f620cb1..f92c989d 100644 --- a/vl.c +++ b/vl.c @@ -172,6 +172,7 @@ int daemonize = 0; const char *option_rom[MAX_OPTION_ROMS]; int nb_option_roms; int semihosting_enabled = 0; +int autostart = 1; /***********************************************************/ /* x86 ISA bus support */ @@ -6530,7 +6531,6 @@ int main(int argc, char **argv) const char *kernel_filename, *kernel_cmdline; DisplayState *ds = &display_state; int cyls, heads, secs, translation; - int start_emulation = 1; char net_clients[MAX_NET_CLIENTS][256]; int nb_net_clients; int optind; @@ -6838,7 +6838,7 @@ int main(int argc, char **argv) bios_dir = optarg; break; case QEMU_OPTION_S: - start_emulation = 0; + autostart = 0; break; case QEMU_OPTION_k: keyboard_layout = optarg; @@ -7254,7 +7254,7 @@ int main(int argc, char **argv) { /* XXX: simplify init */ read_passwords(); - if (start_emulation) { + if (autostart) { vm_start(); } } diff --git a/vl.h b/vl.h index 6bc2d73f..543eb722 100644 --- a/vl.h +++ b/vl.h @@ -160,6 +160,7 @@ extern int usb_enabled; extern int smp_cpus; extern int no_quit; extern int semihosting_enabled; +extern int autostart; #define MAX_OPTION_ROMS 16 extern const char *option_rom[MAX_OPTION_ROMS];