Revision ef0c4a0d vl.c

b/vl.c
1857 1857
        DEV_PARALLEL,  /* -parallel      */
1858 1858
        DEV_VIRTCON,   /* -virtioconsole */
1859 1859
        DEV_DEBUGCON,  /* -debugcon */
1860
        DEV_GDB,       /* -gdb, -s */
1860 1861
    } type;
1861 1862
    const char *cmdline;
1862 1863
    Location loc;
......
2182 2183

  
2183 2184
int main(int argc, char **argv, char **envp)
2184 2185
{
2185
    const char *gdbstub_dev = NULL;
2186 2186
    int i;
2187 2187
    int snapshot, linux_boot;
2188 2188
    const char *icount_option = NULL;
......
2607 2607
                log_file = optarg;
2608 2608
                break;
2609 2609
            case QEMU_OPTION_s:
2610
                gdbstub_dev = "tcp::" DEFAULT_GDBSTUB_PORT;
2610
                add_device_config(DEV_GDB, "tcp::" DEFAULT_GDBSTUB_PORT);
2611 2611
                break;
2612 2612
            case QEMU_OPTION_gdb:
2613
                gdbstub_dev = optarg;
2613
                add_device_config(DEV_GDB, optarg);
2614 2614
                break;
2615 2615
            case QEMU_OPTION_L:
2616 2616
                data_dir = optarg;
......
3500 3500
    }
3501 3501
    text_consoles_set_display(ds);
3502 3502

  
3503
    if (gdbstub_dev && gdbserver_start(gdbstub_dev) < 0) {
3504
        fprintf(stderr, "qemu: could not open gdbserver on device '%s'\n",
3505
                gdbstub_dev);
3503
    if (foreach_device_config(DEV_GDB, gdbserver_start) < 0) {
3506 3504
        exit(1);
3507 3505
    }
3508 3506

  

Also available in: Unified diff