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
This commit is contained in:
parent
72f341ed1e
commit
3c07f8e894
@ -987,7 +987,8 @@ static void gdb_read(void *opaque)
|
|||||||
qemu_del_vm_stop_handler(gdb_vm_stopped, s);
|
qemu_del_vm_stop_handler(gdb_vm_stopped, s);
|
||||||
qemu_set_fd_handler(s->fd, NULL, NULL, NULL);
|
qemu_set_fd_handler(s->fd, NULL, NULL, NULL);
|
||||||
qemu_free(s);
|
qemu_free(s);
|
||||||
vm_start();
|
if (autostart)
|
||||||
|
vm_start();
|
||||||
} else {
|
} else {
|
||||||
for(i = 0; i < size; i++)
|
for(i = 0; i < size; i++)
|
||||||
gdb_read_byte(s, buf[i]);
|
gdb_read_byte(s, buf[i]);
|
||||||
|
6
vl.c
6
vl.c
@ -172,6 +172,7 @@ int daemonize = 0;
|
|||||||
const char *option_rom[MAX_OPTION_ROMS];
|
const char *option_rom[MAX_OPTION_ROMS];
|
||||||
int nb_option_roms;
|
int nb_option_roms;
|
||||||
int semihosting_enabled = 0;
|
int semihosting_enabled = 0;
|
||||||
|
int autostart = 1;
|
||||||
|
|
||||||
/***********************************************************/
|
/***********************************************************/
|
||||||
/* x86 ISA bus support */
|
/* x86 ISA bus support */
|
||||||
@ -6530,7 +6531,6 @@ int main(int argc, char **argv)
|
|||||||
const char *kernel_filename, *kernel_cmdline;
|
const char *kernel_filename, *kernel_cmdline;
|
||||||
DisplayState *ds = &display_state;
|
DisplayState *ds = &display_state;
|
||||||
int cyls, heads, secs, translation;
|
int cyls, heads, secs, translation;
|
||||||
int start_emulation = 1;
|
|
||||||
char net_clients[MAX_NET_CLIENTS][256];
|
char net_clients[MAX_NET_CLIENTS][256];
|
||||||
int nb_net_clients;
|
int nb_net_clients;
|
||||||
int optind;
|
int optind;
|
||||||
@ -6838,7 +6838,7 @@ int main(int argc, char **argv)
|
|||||||
bios_dir = optarg;
|
bios_dir = optarg;
|
||||||
break;
|
break;
|
||||||
case QEMU_OPTION_S:
|
case QEMU_OPTION_S:
|
||||||
start_emulation = 0;
|
autostart = 0;
|
||||||
break;
|
break;
|
||||||
case QEMU_OPTION_k:
|
case QEMU_OPTION_k:
|
||||||
keyboard_layout = optarg;
|
keyboard_layout = optarg;
|
||||||
@ -7254,7 +7254,7 @@ int main(int argc, char **argv)
|
|||||||
{
|
{
|
||||||
/* XXX: simplify init */
|
/* XXX: simplify init */
|
||||||
read_passwords();
|
read_passwords();
|
||||||
if (start_emulation) {
|
if (autostart) {
|
||||||
vm_start();
|
vm_start();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
1
vl.h
1
vl.h
@ -160,6 +160,7 @@ extern int usb_enabled;
|
|||||||
extern int smp_cpus;
|
extern int smp_cpus;
|
||||||
extern int no_quit;
|
extern int no_quit;
|
||||||
extern int semihosting_enabled;
|
extern int semihosting_enabled;
|
||||||
|
extern int autostart;
|
||||||
|
|
||||||
#define MAX_OPTION_ROMS 16
|
#define MAX_OPTION_ROMS 16
|
||||||
extern const char *option_rom[MAX_OPTION_ROMS];
|
extern const char *option_rom[MAX_OPTION_ROMS];
|
||||||
|
Loading…
Reference in New Issue
Block a user