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