[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH 28/28 v2] Separate runtime debug output from debug symbols



>>> On 26.09.14 at 13:40, <olaf@xxxxxxxxx> wrote:
> --- a/tools/tests/vhpet/Makefile
> +++ b/tools/tests/vhpet/Makefile
> @@ -20,7 +20,7 @@ run: $(TARGET)
>       ./$(TARGET) 200 1 0 20 0x0103 > $(TARGET).200.1.0.20.0x0103.out
>  
>  $(TARGET): hpet.c main.c hpet.h emul.h Makefile
> -     $(HOSTCC) -g -o $@ hpet.c main.c
> +     $(HOSTCC) $(HOSTCFLAGS) -o $@ hpet.c main.c
>  
>  .PHONY: clean
>  clean:
> --- a/tools/tests/x86_emulator/Makefile
> +++ b/tools/tests/x86_emulator/Makefile
> @@ -43,7 +43,7 @@ x86_emulate/x86_emulate.c x86_emulate/x86_emulate.h:
>  HOSTCFLAGS += $(CFLAGS_xeninclude)
>  
>  x86_emulate.o: x86_emulate.c x86_emulate/x86_emulate.c 
> x86_emulate/x86_emulate.h
> -     $(HOSTCC) $(HOSTCFLAGS) -c -g -o $@ $<
> +     $(HOSTCC) $(HOSTCFLAGS) -c -o $@ $<
>  
>  test_x86_emulator.o: test_x86_emulator.c blowfish.h 
> x86_emulate/x86_emulate.h
> -     $(HOSTCC) $(HOSTCFLAGS) -c -g -o $@ $<
> +     $(HOSTCC) $(HOSTCFLAGS) -c -o $@ $<

I question this for all three instances above: These are purely testing
tools which don't even get built by default. There's nothing wrong with
them always being built with debug info, allowing to immediately run
them usefully in a debugger without consideration of build mode.

> --- a/xen/Rules.mk
> +++ b/xen/Rules.mk
> @@ -10,6 +10,10 @@ lock_profile  ?= n
>  crash_debug   ?= n
>  frame_pointer ?= n
>  lto           ?= n
> +debug_xen     ?= y
> +debuginfo_xen ?= y
> +debug         := $(debug_xen)
> +debug_symbols := $(debuginfo_xen)

I'm not sure I want to see this do away with the old mechanism
altogether - various of my testing build flavors depend on overriding
the "debug" variable, and I wouldn't want to change all their .config
files. At least for a certain period of time the latter two should
probably continue to use ?=.

> @@ -43,7 +47,10 @@ ALL_OBJS-$(x86)          += $(BASEDIR)/crypto/built_in.o
>  
>  CFLAGS += -fno-builtin -fno-common
>  CFLAGS += -Werror -Wredundant-decls -Wno-pointer-arith
> -CFLAGS += -pipe -g -D__XEN__ -include $(BASEDIR)/include/xen/config.h
> +ifeq ($(debug_symbols),y)
> +CFLAGS += -g
> +endif
> +CFLAGS += -pipe -D__XEN__ -include $(BASEDIR)/include/xen/config.h
>  CFLAGS += -nostdinc
>  
>  CFLAGS-$(XSM_ENABLE)    += -DXSM_ENABLE

The context here shows that CFLAGS-y gets used elsewhere, so
please do so too above. And if possible this should be considered
elsewhere too.

In any event I don't see this change as important enough to
warrant overriding the feature freeze.

Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.