summaryrefslogtreecommitdiff
path: root/extension
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2022-10-28 11:19:34 +0300
committerArnold D. Robbins <arnold@skeeve.com>2022-10-28 11:19:34 +0300
commit46cba4567028a61212be90b0ebb192c4734c007d (patch)
treeb92ef74ee9aac6d27910b161c306cb48decaa3f8 /extension
parent037b21d09f684cea35ff33c19214b5f1a7711bd3 (diff)
downloadgawk-46cba4567028a61212be90b0ebb192c4734c007d.tar.gz
Improve debuggability, mainly for maintainers.
Diffstat (limited to 'extension')
-rw-r--r--extension/ChangeLog8
-rw-r--r--extension/Makefile.am3
-rw-r--r--extension/Makefile.in3
-rwxr-xr-xextension/configure4
-rw-r--r--extension/configure.ac4
5 files changed, 18 insertions, 4 deletions
diff --git a/extension/ChangeLog b/extension/ChangeLog
index 4caf864e..04d6b35c 100644
--- a/extension/ChangeLog
+++ b/extension/ChangeLog
@@ -1,3 +1,11 @@
+2022-10-28 Arnold D. Robbins <arnold@skeeve.com>
+
+ * Makefile.am (DEBUG): New variable with debug compilation flags.
+ * configure.ac: Rework debug compilation to use DEBUG in Makefile.am
+ and to add %no-lines to grammar files. Works around GDB issue
+ with macros and #line directives. Thanks to Ulrich Drepper
+ for the help and for the suggestions.
+
2022-10-26 Arnold D. Robbins <arnold@skeeve.com>
* configure.ac: Try to get macros to work in the debugger.
diff --git a/extension/Makefile.am b/extension/Makefile.am
index 736fa1ef..28208c5a 100644
--- a/extension/Makefile.am
+++ b/extension/Makefile.am
@@ -152,5 +152,8 @@ dist_man_MANS = \
# gettext requires this
SUBDIRS = po
+# For debugging
+DEBUG = -gdwarf-4 -g3
+
distclean-local:
rm -fr .deps
diff --git a/extension/Makefile.in b/extension/Makefile.in
index 7cf10cee..6c8937c0 100644
--- a/extension/Makefile.in
+++ b/extension/Makefile.in
@@ -665,6 +665,9 @@ dist_man_MANS = \
# gettext requires this
SUBDIRS = po
+
+# For debugging
+DEBUG = -gdwarf-4 -g3
all: config.h
$(MAKE) $(AM_MAKEFLAGS) all-recursive
diff --git a/extension/configure b/extension/configure
index 387f8391..477aa0ed 100755
--- a/extension/configure
+++ b/extension/configure
@@ -17132,7 +17132,7 @@ if test -f $srcdir/../.developing
then
if test "$GCC" = yes
then
- CFLAGS="$CFLAGS -Wall -fno-builtin -gdwarf-4 -g3"
+ CFLAGS="$CFLAGS -Wall -fno-builtin"
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }
@@ -20229,7 +20229,7 @@ if test "$GCC" = yes &&
test -f $srcdir/../.developing &&
grep -i debug $srcdir/../.developing > /dev/null
then
- sed '/-O2/s///' Makefile > foo
+ sed -e '/-O2/s///' -e '/^CFLAGS = /s//&${DEBUG} /' Makefile > foo
mv foo Makefile
fi
diff --git a/extension/configure.ac b/extension/configure.ac
index 2f598305..412db25c 100644
--- a/extension/configure.ac
+++ b/extension/configure.ac
@@ -93,7 +93,7 @@ if test -f $srcdir/../.developing
then
if test "$GCC" = yes
then
- CFLAGS="$CFLAGS -Wall -fno-builtin -gdwarf-4 -g3"
+ CFLAGS="$CFLAGS -Wall -fno-builtin"
fi
AC_MSG_RESULT([yes])
else
@@ -140,6 +140,6 @@ if test "$GCC" = yes &&
test -f $srcdir/../.developing &&
grep -i debug $srcdir/../.developing > /dev/null
then
- sed '/-O2/s///' Makefile > foo
+ sed -e '/-O2/s///' -e '/^CFLAGS = /s//&${DEBUG} /' Makefile > foo
mv foo Makefile
fi