[Crash-utility] [PATCH 6/6] Build extensions with -g
Dave Anderson
anderson at redhat.com
Fri Apr 24 14:45:45 UTC 2015
----- Original Message -----
> 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(-)
I also added -g to snap.mk to cover all of the built-in extension modules.
Queued for crash-7.1.1:
https://github.com/crash-utility/crash/commit/407ce33ed0035269dcd788f0e98ddbe7c823319e
Thanks,
Dave
>
> 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
>
> --
> Crash-utility mailing list
> Crash-utility at redhat.com
> https://www.redhat.com/mailman/listinfo/crash-utility
>
More information about the Crash-utility
mailing list