[dpdk-dev] [PATCH] mk: add support for gdb debug info generation

Thomas Monjalon thomas.monjalon at 6wind.com
Tue Jun 23 09:47:15 CEST 2015


2015-06-23 08:39, Gonzalez Monroy, Sergio:
> On 22/06/2015 08:56, Simon Kågström wrote:
> > On 2015-06-22 09:44, Gonzalez Monroy, Sergio wrote:
> >> On 19/06/2015 22:29, Cyril Chemparathy wrote:
> >>> From: Cyril Chemparathy <cchemparathy at tilera.com>
> >>>
> >>> It is often useful to build with debug enabled, we add a config
> >>> (CONFIG_RTE_TOOLCHAIN_DEBUG) to do so.
> >>>
> >>>    +ifeq ($(CONFIG_RTE_TOOLCHAIN_DEBUG),y)
> >>> +TOOLCHAIN_CFLAGS += -g -ggdb
> >>> +TOOLCHAIN_LDFLAGS += -g -ggdb
> >>> +endif
> >> I don't think you need to modify the makefiles and introduce a new
> >> compile time option for this.
> >> The same result can be easily achieved by setting EXTRA_CFLAGS in the
> >> command line. ie:
> >>      $ make install T=x86_64-native-linuxapp-gcc EXTRA_CFLAGS='-g -ggdb'
> > Why isn't -g standard though? The binaries should/will anyhow be
> > stripped when used for production - but debugging information should be
> > useful when analysing crashes.
> 
> I guess you could argue that, to always build with debug info then strip 
> it down.
> You would need another flag to strip debug info for production, or leave 
> it for debugging.
> 
> In my opinion is not worth it, but it you feel strongly about it you can 
> submit patches and
> let the community decide.

I think stripping is a packaging responsibility.
It would be a good idea to always provide debugging symbols.


More information about the dev mailing list