Makefile, configurator: Add additional debug flags to CFLAGS
authorAndrey Smirnov <andrew.smirnov@gmail.com>
Mon, 12 Dec 2011 03:19:57 +0000 (13:49 +1030)
committerRusty Russell <rusty@rustcorp.com.au>
Mon, 12 Dec 2011 03:19:57 +0000 (13:49 +1030)
Just adding `-g' to list of CFLAGS doesn't make gcc to generate debug
information required for macro expansion during debugging. Replacing
it with `-g3 -ggdb' rectifies this.

(configurator.c commit folded by Rusty)

Makefile-ccan
config.h
tools/configurator/configurator.c

index 3efe59a5da2fdbee4c602797c2a3f4a08288b893..bab41388568b4b982e411b2393710d5a960f216c 100644 (file)
@@ -3,7 +3,7 @@
 #      SRCFILES += $(wildcard ccan/*/*.c)
 
 #CCAN_CFLAGS=-g -O3 -Wall -Wstrict-prototypes -Wold-style-definition -Wmissing-prototypes -Wmissing-declarations
-CCAN_CFLAGS=-g -Wall -Wstrict-prototypes -Wold-style-definition -Wmissing-prototypes -Wmissing-declarations -Wpointer-arith -Wwrite-strings -DCCAN_STR_DEBUG=1
+CCAN_CFLAGS=-g3 -ggdb -Wall -Wstrict-prototypes -Wold-style-definition -Wmissing-prototypes -Wmissing-declarations -Wpointer-arith -Wwrite-strings -DCCAN_STR_DEBUG=1
 CFLAGS = $(CCAN_CFLAGS) -I. $(DEPGEN)
 
 
index 5d2031ed44320b0a136b08867d71c4a9198bb042..14788013deac11b6d738f308019044898034f73a 100644 (file)
--- a/config.h
+++ b/config.h
@@ -5,7 +5,7 @@
 #define _GNU_SOURCE /* Always use GNU extensions. */
 #endif
 #define CCAN_COMPILER "cc"
-#define CCAN_CFLAGS "-g -Wall -Wstrict-prototypes -Wold-style-definition -Wmissing-prototypes -Wmissing-declarations -Wpointer-arith -Wwrite-strings -DCCAN_STR_DEBUG=1"
+#define CCAN_CFLAGS "-g3 -ggdb -Wall -Wstrict-prototypes -Wold-style-definition -Wmissing-prototypes -Wmissing-declarations -Wpointer-arith -Wwrite-strings -DCCAN_STR_DEBUG=1"
 
 #define HAVE_32BIT_OFF_T 1
 #define HAVE_ALIGNOF 1
index 802559de979ffadafa5b24d4adeac3b8fd9b9f16..e2c13b7e57161d004832e80af0a78b9a967f48d9 100644 (file)
@@ -33,7 +33,7 @@
 #include <string.h>
 
 #define DEFAULT_COMPILER "cc"
-#define DEFAULT_FLAGS "-g -Wall -Wundef -Wmissing-prototypes -Wmissing-declarations -Wstrict-prototypes -Wold-style-definition"
+#define DEFAULT_FLAGS "-g3 -ggdb -Wall -Wundef -Wmissing-prototypes -Wmissing-declarations -Wstrict-prototypes -Wold-style-definition"
 
 #define OUTPUT_FILE "configurator.out"
 #define INPUT_FILE "configuratortest.c"