Commit 322f9d0153cd0a05dfba6e02927fe10e3549e461

Authored by Jan Kiszka
Committed by Paul Brook
1 parent c599710f

Drop CONFIG_GDBSTUB

This is no user-flippable switch, and no arch makes use of disabling
gdbstub support. So it's pointless to keep the related #ifdefs and
configure hunks around - and risking breakages like 711c410fdd again.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Makefile.target
@@ -317,7 +317,7 @@ CFLAGS+=-p @@ -317,7 +317,7 @@ CFLAGS+=-p
317 endif 317 endif
318 318
319 OBJS= main.o syscall.o strace.o mmap.o signal.o path.o thunk.o \ 319 OBJS= main.o syscall.o strace.o mmap.o signal.o path.o thunk.o \
320 - elfload.o linuxload.o uaccess.o envlist.o 320 + elfload.o linuxload.o uaccess.o envlist.o gdbstub.o gdbstub-xml.o
321 LIBS+= $(PTHREADLIBS) 321 LIBS+= $(PTHREADLIBS)
322 LIBS+= $(CLOCKLIBS) 322 LIBS+= $(CLOCKLIBS)
323 ifdef TARGET_HAS_BFLT 323 ifdef TARGET_HAS_BFLT
@@ -340,10 +340,6 @@ ifeq ($(TARGET_ARCH), m68k) @@ -340,10 +340,6 @@ ifeq ($(TARGET_ARCH), m68k)
340 OBJS+= m68k-sim.o m68k-semi.o 340 OBJS+= m68k-sim.o m68k-semi.o
341 endif 341 endif
342 342
343 -ifdef CONFIG_GDBSTUB  
344 -OBJS+=gdbstub.o gdbstub-xml.o  
345 -endif  
346 -  
347 OBJS+= libqemu.a 343 OBJS+= libqemu.a
348 344
349 # Note: this is a workaround. The real fix is to avoid compiling 345 # Note: this is a workaround. The real fix is to avoid compiling
@@ -373,14 +369,11 @@ LDFLAGS+=-Wl,-segaddr,__STD_PROG_ZONE,0x1000 -image_base 0x0e000000 @@ -373,14 +369,11 @@ LDFLAGS+=-Wl,-segaddr,__STD_PROG_ZONE,0x1000 -image_base 0x0e000000
373 369
374 LIBS+=-lmx 370 LIBS+=-lmx
375 371
376 -OBJS= main.o commpage.o machload.o mmap.o signal.o syscall.o thunk.o 372 +OBJS= main.o commpage.o machload.o mmap.o signal.o syscall.o thunk.o \
  373 + gdbstub.o gdbstub-xml.o
377 374
378 OBJS+= libqemu.a 375 OBJS+= libqemu.a
379 376
380 -ifdef CONFIG_GDBSTUB  
381 -OBJS+=gdbstub.o gdbstub-xml.o  
382 -endif  
383 -  
384 # Note: this is a workaround. The real fix is to avoid compiling 377 # Note: this is a workaround. The real fix is to avoid compiling
385 # cpu_signal_handler() in cpu-exec.c. 378 # cpu_signal_handler() in cpu-exec.c.
386 signal.o: CFLAGS += $(HELPER_CFLAGS) 379 signal.o: CFLAGS += $(HELPER_CFLAGS)
@@ -476,15 +469,12 @@ LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH)el.ld @@ -476,15 +469,12 @@ LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH)el.ld
476 endif 469 endif
477 endif 470 endif
478 471
479 -OBJS= main.o bsdload.o elfload.o mmap.o path.o signal.o strace.o syscall.o 472 +OBJS= main.o bsdload.o elfload.o mmap.o path.o signal.o strace.o syscall.o \
  473 + gdbstub.o gdbstub-xml.o
480 OBJS+= uaccess.o 474 OBJS+= uaccess.o
481 475
482 OBJS+= libqemu.a 476 OBJS+= libqemu.a
483 477
484 -ifdef CONFIG_GDBSTUB  
485 -OBJS+=gdbstub.o  
486 -endif  
487 -  
488 # Note: this is a workaround. The real fix is to avoid compiling 478 # Note: this is a workaround. The real fix is to avoid compiling
489 # cpu_signal_handler() in cpu-exec.c. 479 # cpu_signal_handler() in cpu-exec.c.
490 signal.o: CFLAGS += $(HELPER_CFLAGS) 480 signal.o: CFLAGS += $(HELPER_CFLAGS)
@@ -498,7 +488,8 @@ endif #CONFIG_BSD_USER @@ -498,7 +488,8 @@ endif #CONFIG_BSD_USER
498 # System emulator target 488 # System emulator target
499 ifndef CONFIG_USER_ONLY 489 ifndef CONFIG_USER_ONLY
500 490
501 -OBJS=vl.o osdep.o monitor.o pci.o loader.o isa_mmio.o machine.o dma-helpers.o 491 +OBJS=vl.o osdep.o monitor.o pci.o loader.o isa_mmio.o machine.o dma-helpers.o \
  492 + gdbstub.o gdbstub-xml.o
502 # virtio has to be here due to weird dependency between PCI and virtio-net. 493 # virtio has to be here due to weird dependency between PCI and virtio-net.
503 # need to fix this properly 494 # need to fix this properly
504 OBJS+=virtio.o virtio-blk.o virtio-balloon.o virtio-net.o virtio-console.o 495 OBJS+=virtio.o virtio-blk.o virtio-balloon.o virtio-net.o virtio-console.o
@@ -686,9 +677,6 @@ ifeq ($(TARGET_BASE_ARCH), m68k) @@ -686,9 +677,6 @@ ifeq ($(TARGET_BASE_ARCH), m68k)
686 OBJS+= an5206.o mcf5206.o mcf_uart.o mcf_intc.o mcf5208.o mcf_fec.o 677 OBJS+= an5206.o mcf5206.o mcf_uart.o mcf_intc.o mcf5208.o mcf_fec.o
687 OBJS+= m68k-semi.o dummy_m68k.o 678 OBJS+= m68k-semi.o dummy_m68k.o
688 endif 679 endif
689 -ifdef CONFIG_GDBSTUB  
690 -OBJS+=gdbstub.o gdbstub-xml.o  
691 -endif  
692 ifdef CONFIG_COCOA 680 ifdef CONFIG_COCOA
693 COCOA_LIBS=-F/System/Library/Frameworks -framework Cocoa -framework IOKit 681 COCOA_LIBS=-F/System/Library/Frameworks -framework Cocoa -framework IOKit
694 ifdef CONFIG_COREAUDIO 682 ifdef CONFIG_COREAUDIO
configure
@@ -159,7 +159,6 @@ strip_opt=&quot;yes&quot; @@ -159,7 +159,6 @@ strip_opt=&quot;yes&quot;
159 bigendian="no" 159 bigendian="no"
160 mingw32="no" 160 mingw32="no"
161 EXESUF="" 161 EXESUF=""
162 -gdbstub="yes"  
163 slirp="yes" 162 slirp="yes"
164 vde="yes" 163 vde="yes"
165 fmod_lib="" 164 fmod_lib=""
@@ -1526,10 +1525,6 @@ if test -n &quot;$sparc_cpu&quot;; then @@ -1526,10 +1525,6 @@ if test -n &quot;$sparc_cpu&quot;; then
1526 echo "CONFIG__sparc_${sparc_cpu}__=yes" >> $config_mak 1525 echo "CONFIG__sparc_${sparc_cpu}__=yes" >> $config_mak
1527 echo "#define __sparc_${sparc_cpu}__ 1" >> $config_h 1526 echo "#define __sparc_${sparc_cpu}__ 1" >> $config_h
1528 fi 1527 fi
1529 -if test "$gdbstub" = "yes" ; then  
1530 - echo "CONFIG_GDBSTUB=yes" >> $config_mak  
1531 - echo "#define CONFIG_GDBSTUB 1" >> $config_h  
1532 -fi  
1533 if test "$gprof" = "yes" ; then 1528 if test "$gprof" = "yes" ; then
1534 echo "TARGET_GPROF=yes" >> $config_mak 1529 echo "TARGET_GPROF=yes" >> $config_mak
1535 echo "#define HAVE_GPROF 1" >> $config_h 1530 echo "#define HAVE_GPROF 1" >> $config_h
monitor.c
@@ -581,7 +581,6 @@ static void encrypted_bdrv_it(void *opaque, BlockDriverState *bs) @@ -581,7 +581,6 @@ static void encrypted_bdrv_it(void *opaque, BlockDriverState *bs)
581 } 581 }
582 } 582 }
583 583
584 -#ifdef CONFIG_GDBSTUB  
585 static void do_gdbserver(Monitor *mon, const char *device) 584 static void do_gdbserver(Monitor *mon, const char *device)
586 { 585 {
587 if (!device) 586 if (!device)
@@ -596,7 +595,6 @@ static void do_gdbserver(Monitor *mon, const char *device) @@ -596,7 +595,6 @@ static void do_gdbserver(Monitor *mon, const char *device)
596 device); 595 device);
597 } 596 }
598 } 597 }
599 -#endif  
600 598
601 static void do_watchdog_action(Monitor *mon, const char *action) 599 static void do_watchdog_action(Monitor *mon, const char *action)
602 { 600 {
@@ -1692,10 +1690,8 @@ static const mon_cmd_t mon_cmds[] = { @@ -1692,10 +1690,8 @@ static const mon_cmd_t mon_cmds[] = {
1692 "", "stop emulation", }, 1690 "", "stop emulation", },
1693 { "c|cont", "", do_cont, 1691 { "c|cont", "", do_cont,
1694 "", "resume emulation", }, 1692 "", "resume emulation", },
1695 -#ifdef CONFIG_GDBSTUB  
1696 { "gdbserver", "s?", do_gdbserver, 1693 { "gdbserver", "s?", do_gdbserver,
1697 "[device]", "start gdbserver on given device (default 'tcp::1234'), stop with 'none'", }, 1694 "[device]", "start gdbserver on given device (default 'tcp::1234'), stop with 'none'", },
1698 -#endif  
1699 { "x", "/l", do_memory_dump, 1695 { "x", "/l", do_memory_dump,
1700 "/fmt addr", "virtual memory dump starting at 'addr'", }, 1696 "/fmt addr", "virtual memory dump starting at 'addr'", },
1701 { "xp", "/l", do_physical_memory_dump, 1697 { "xp", "/l", do_physical_memory_dump,
@@ -4350,13 +4350,11 @@ static void tcg_cpu_exec(void) @@ -4350,13 +4350,11 @@ static void tcg_cpu_exec(void)
4350 } 4350 }
4351 if (cpu_can_run(env)) 4351 if (cpu_can_run(env))
4352 ret = qemu_cpu_exec(env); 4352 ret = qemu_cpu_exec(env);
4353 -#ifndef CONFIG_GDBSTUB  
4354 if (ret == EXCP_DEBUG) { 4353 if (ret == EXCP_DEBUG) {
4355 gdb_set_stop_cpu(env); 4354 gdb_set_stop_cpu(env);
4356 debug_requested = 1; 4355 debug_requested = 1;
4357 break; 4356 break;
4358 } 4357 }
4359 -#endif  
4360 } 4358 }
4361 } 4359 }
4362 4360
@@ -4795,9 +4793,7 @@ static void termsig_setup(void) @@ -4795,9 +4793,7 @@ static void termsig_setup(void)
4795 4793
4796 int main(int argc, char **argv, char **envp) 4794 int main(int argc, char **argv, char **envp)
4797 { 4795 {
4798 -#ifdef CONFIG_GDBSTUB  
4799 const char *gdbstub_dev = NULL; 4796 const char *gdbstub_dev = NULL;
4800 -#endif  
4801 uint32_t boot_devices_bitmap = 0; 4797 uint32_t boot_devices_bitmap = 0;
4802 int i; 4798 int i;
4803 int snapshot, linux_boot, net_boot; 4799 int snapshot, linux_boot, net_boot;
@@ -5229,14 +5225,12 @@ int main(int argc, char **argv, char **envp) @@ -5229,14 +5225,12 @@ int main(int argc, char **argv, char **envp)
5229 cpu_set_log(mask); 5225 cpu_set_log(mask);
5230 } 5226 }
5231 break; 5227 break;
5232 -#ifdef CONFIG_GDBSTUB  
5233 case QEMU_OPTION_s: 5228 case QEMU_OPTION_s:
5234 gdbstub_dev = "tcp::" DEFAULT_GDBSTUB_PORT; 5229 gdbstub_dev = "tcp::" DEFAULT_GDBSTUB_PORT;
5235 break; 5230 break;
5236 case QEMU_OPTION_gdb: 5231 case QEMU_OPTION_gdb:
5237 gdbstub_dev = optarg; 5232 gdbstub_dev = optarg;
5238 break; 5233 break;
5239 -#endif  
5240 case QEMU_OPTION_L: 5234 case QEMU_OPTION_L:
5241 bios_dir = optarg; 5235 bios_dir = optarg;
5242 break; 5236 break;
@@ -6023,13 +6017,11 @@ int main(int argc, char **argv, char **envp) @@ -6023,13 +6017,11 @@ int main(int argc, char **argv, char **envp)
6023 } 6017 }
6024 } 6018 }
6025 6019
6026 -#ifdef CONFIG_GDBSTUB  
6027 if (gdbstub_dev && gdbserver_start(gdbstub_dev) < 0) { 6020 if (gdbstub_dev && gdbserver_start(gdbstub_dev) < 0) {
6028 fprintf(stderr, "qemu: could not open gdbserver on device '%s'\n", 6021 fprintf(stderr, "qemu: could not open gdbserver on device '%s'\n",
6029 gdbstub_dev); 6022 gdbstub_dev);
6030 exit(1); 6023 exit(1);
6031 } 6024 }
6032 -#endif  
6033 6025
6034 if (loadvm) 6026 if (loadvm)
6035 do_loadvm(cur_mon, loadvm); 6027 do_loadvm(cur_mon, loadvm);