[Crash-utility] [PATCH 6/6] Build extensions with -g

Rabin Vincent rabin.vincent at axis.com
Fri Apr 24 14:09:18 UTC 2015


We already build crash with -g, let's build extensions with that too, so
that we can debug them with gdb.
---
 extensions/Makefile |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/extensions/Makefile b/extensions/Makefile
index 1e42805..551c54d 100644
--- a/extensions/Makefile
+++ b/extensions/Makefile
@@ -38,12 +38,12 @@ $(CONTRIB_SO): %.so: %.c defs.h
 	else \
 		grep '((constructor))' $*.c > .constructor; \
 		if [ -s .constructor ]; then \
-			echo "gcc -Wall -shared -rdynamic -o $@ $*.c -fPIC -D$(TARGET) $(TARGET_CFLAGS) $(GDB_FLAGS)"; \
-			gcc -Wall -shared -rdynamic -o $@ $*.c -fPIC -D$(TARGET) $(TARGET_CFLAGS) $(GDB_FLAGS); \
+			echo "gcc -Wall -g -shared -rdynamic -o $@ $*.c -fPIC -D$(TARGET) $(TARGET_CFLAGS) $(GDB_FLAGS)"; \
+			gcc -Wall -g -shared -rdynamic -o $@ $*.c -fPIC -D$(TARGET) $(TARGET_CFLAGS) $(GDB_FLAGS); \
 		fi; \
 		if [ ! -s .constructor ]; then \
-			echo "gcc -Wall -nostartfiles -shared -rdynamic -o $@ $*.c -fPIC -D$(TARGET) $(TARGET_CFLAGS) $(GDB_FLAGS)"; \
-			gcc -Wall -nostartfiles -shared -rdynamic -o $@ $*.c -fPIC -D$(TARGET) $(TARGET_CFLAGS) $(GDB_FLAGS); \
+			echo "gcc -Wall -g -nostartfiles -shared -rdynamic -o $@ $*.c -fPIC -D$(TARGET) $(TARGET_CFLAGS) $(GDB_FLAGS)"; \
+			gcc -Wall -g -nostartfiles -shared -rdynamic -o $@ $*.c -fPIC -D$(TARGET) $(TARGET_CFLAGS) $(GDB_FLAGS); \
 		fi; \
 	fi
 
-- 
1.7.10.4




More information about the Crash-utility mailing list