[Xenomai-git] Philippe Gerum : build: introduce symbols-only debug level
Module: xenomai-forge Branch: master Commit: 2b6326701c2261ab42e3203a29782ad8905f0665 URL: http://git.xenomai.org/?p=xenomai-forge.git;a=commit;h=2b6326701c2261ab42e3203a29782ad8905f0665 Author: Philippe Gerum r...@xenomai.org Date: Sun Jul 7 18:43:15 2013 +0200 build: introduce symbols-only debug level --enable-debug[=partial] symbols enables debug symbols to be compiled in the libraries and executables, still turning on the optimizer (-O2). This option has no overhead, it is useful to get meaningful backtraces using gdb while running the application at nominal speed. partial includes symbols, and also turns on internal consistency checks within the Xenomai code (mostly present in the Copperplate layer). The __XENO_DEBUG__ macro is defined, for both the Xenomai core and the applications getting their C compilation flags from the xeno-config script (i.e. xeno-config --cflags). The partial debug mode implicitly turns on --enable-assert. A measurable overhead is introduced by this level. This is the default level when --enable-debug is mentioned with no level specification. full includes partial settings, but the optimizer is disabled (-O0), and even more consistency checks may be performed. In addition to __XENO_DEBUG__, the macro __XENO_DEBUG_FULL__ is defined. This level introduces the most overhead, which may triple the worst-case latency, or even more. --- README | 50 ++ configure| 26 ++ configure.in | 28 +++- 3 files changed, 79 insertions(+), 25 deletions(-) diff --git a/README b/README index 17852e7..8185280 100644 --- a/README +++ b/README @@ -93,25 +93,43 @@ Where other-options may be any standard autoconf switch, such as: or Xenomai-specific knobs: ---enable-debug[=full] +--enable-debug[=partial] - This switch will enable debug mode, causing debug symbols to - be compiled in the libraries and executables, passing the -g - flag to the compiler to get debug symbols. When enabled, this - switch also causes the __XENO_DEBUG__ macro to be defined, for - both the Xenomai core and the applications getting their C - compilation flags from the xeno-config script - (i.e. xeno-config --cflags). Debug mode is off by default. + This switch controls the debug level. Three levels are + available, with varying overhead: - If the full debug level is specified along with this switch, - -O0 is passed to the compiler, to disable the optimizer. In - addition, the macro __XENO_DEBUG_FULL__ is also defined. + symbols enables debug symbols to be compiled in the + libraries and executables, still turning on the optimizer + (-O2). This option has no overhead, it is useful to get + meaningful backtraces using gdb while running the application + at nominal speed. - Over the Mercury core, enabling debug mode also causes the - standard malloc interface to be used internally instead of a - fast real-time allocator (TLSF). This allows debugging - memory-related issues with the help of Valgrind or other - dynamic memory analysers. + partial includes symbols, and also turns on internal + consistency checks within the Xenomai code (mostly present in + the Copperplate layer). The __XENO_DEBUG__ macro is defined, + for both the Xenomai core and the applications getting their C + compilation flags from the xeno-config script + (i.e. xeno-config --cflags). The partial debug mode implicitly + turns on --enable-assert. A measurable overhead is introduced + by this level. This is the default level when --enable-debug + is mentioned with no level specification. + + full includes partial settings, but the optimizer is + disabled (-O0), and even more consistency checks may be + performed. In addition to __XENO_DEBUG__, the macro + __XENO_DEBUG_FULL__ is defined. This level introduces the most + overhead, which may triple the worst-case latency, or even + more. + + Over the Mercury core, enabling partial or full debug + modes also causes the standard malloc interface to be used + internally instead of a fast real-time allocator (TLSF). This + allows debugging memory-related issues with the help of + Valgrind or other dynamic memory analysers. + + --disable-debug fully turns off all consistency checks and + assertions, turns on the optimizer and disables debug symbol + generation. --enable-assert diff --git a/configure b/configure index c4580df..d936571 100755 --- a/configure +++ b/configure @@ -12656,14 +12656,30 @@ CC=$lt_save_CC debug_mode= +debug_symbols= { $as_echo $as_me:${as_lineno-$LINENO}: checking whether to enable debug mode 5 $as_echo_n checking whether to enable debug mode... 6; } # Check whether
[Xenomai-git] Philippe Gerum : build: introduce symbols-only debug level
Module: xenomai-forge Branch: next Commit: 2b6326701c2261ab42e3203a29782ad8905f0665 URL: http://git.xenomai.org/?p=xenomai-forge.git;a=commit;h=2b6326701c2261ab42e3203a29782ad8905f0665 Author: Philippe Gerum r...@xenomai.org Date: Sun Jul 7 18:43:15 2013 +0200 build: introduce symbols-only debug level --enable-debug[=partial] symbols enables debug symbols to be compiled in the libraries and executables, still turning on the optimizer (-O2). This option has no overhead, it is useful to get meaningful backtraces using gdb while running the application at nominal speed. partial includes symbols, and also turns on internal consistency checks within the Xenomai code (mostly present in the Copperplate layer). The __XENO_DEBUG__ macro is defined, for both the Xenomai core and the applications getting their C compilation flags from the xeno-config script (i.e. xeno-config --cflags). The partial debug mode implicitly turns on --enable-assert. A measurable overhead is introduced by this level. This is the default level when --enable-debug is mentioned with no level specification. full includes partial settings, but the optimizer is disabled (-O0), and even more consistency checks may be performed. In addition to __XENO_DEBUG__, the macro __XENO_DEBUG_FULL__ is defined. This level introduces the most overhead, which may triple the worst-case latency, or even more. --- README | 50 ++ configure| 26 ++ configure.in | 28 +++- 3 files changed, 79 insertions(+), 25 deletions(-) diff --git a/README b/README index 17852e7..8185280 100644 --- a/README +++ b/README @@ -93,25 +93,43 @@ Where other-options may be any standard autoconf switch, such as: or Xenomai-specific knobs: ---enable-debug[=full] +--enable-debug[=partial] - This switch will enable debug mode, causing debug symbols to - be compiled in the libraries and executables, passing the -g - flag to the compiler to get debug symbols. When enabled, this - switch also causes the __XENO_DEBUG__ macro to be defined, for - both the Xenomai core and the applications getting their C - compilation flags from the xeno-config script - (i.e. xeno-config --cflags). Debug mode is off by default. + This switch controls the debug level. Three levels are + available, with varying overhead: - If the full debug level is specified along with this switch, - -O0 is passed to the compiler, to disable the optimizer. In - addition, the macro __XENO_DEBUG_FULL__ is also defined. + symbols enables debug symbols to be compiled in the + libraries and executables, still turning on the optimizer + (-O2). This option has no overhead, it is useful to get + meaningful backtraces using gdb while running the application + at nominal speed. - Over the Mercury core, enabling debug mode also causes the - standard malloc interface to be used internally instead of a - fast real-time allocator (TLSF). This allows debugging - memory-related issues with the help of Valgrind or other - dynamic memory analysers. + partial includes symbols, and also turns on internal + consistency checks within the Xenomai code (mostly present in + the Copperplate layer). The __XENO_DEBUG__ macro is defined, + for both the Xenomai core and the applications getting their C + compilation flags from the xeno-config script + (i.e. xeno-config --cflags). The partial debug mode implicitly + turns on --enable-assert. A measurable overhead is introduced + by this level. This is the default level when --enable-debug + is mentioned with no level specification. + + full includes partial settings, but the optimizer is + disabled (-O0), and even more consistency checks may be + performed. In addition to __XENO_DEBUG__, the macro + __XENO_DEBUG_FULL__ is defined. This level introduces the most + overhead, which may triple the worst-case latency, or even + more. + + Over the Mercury core, enabling partial or full debug + modes also causes the standard malloc interface to be used + internally instead of a fast real-time allocator (TLSF). This + allows debugging memory-related issues with the help of + Valgrind or other dynamic memory analysers. + + --disable-debug fully turns off all consistency checks and + assertions, turns on the optimizer and disables debug symbol + generation. --enable-assert diff --git a/configure b/configure index c4580df..d936571 100755 --- a/configure +++ b/configure @@ -12656,14 +12656,30 @@ CC=$lt_save_CC debug_mode= +debug_symbols= { $as_echo $as_me:${as_lineno-$LINENO}: checking whether to enable debug mode 5 $as_echo_n checking whether to enable debug mode... 6; } # Check whether