[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[SCM] gawk branch, gawk-5.3-stable, updated. gawk-4.1.0-5440-g8083ca90
From: |
Arnold Robbins |
Subject: |
[SCM] gawk branch, gawk-5.3-stable, updated. gawk-4.1.0-5440-g8083ca90 |
Date: |
Sun, 24 Dec 2023 05:12:51 -0500 (EST) |
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "gawk".
The branch, gawk-5.3-stable has been updated
via 8083ca907e3c427ae514a6b4ca91c7459d69ffdb (commit)
from f48672bba12d1abde280ba7eafc0dbdba7a7680a (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://git.sv.gnu.org/cgit/gawk.git/commit/?id=8083ca907e3c427ae514a6b4ca91c7459d69ffdb
commit 8083ca907e3c427ae514a6b4ca91c7459d69ffdb
Author: Arnold D. Robbins <arnold@skeeve.com>
Date: Sun Dec 24 12:12:21 2023 +0200
Fix yet another array printing bug in the debugger.
diff --git a/ChangeLog b/ChangeLog
index 1d7e0bfc..9e83d05d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2023-12-24 Arnold D. Robbins <arnold@skeeve.com>
+
+ * debug.c pr (print_array): Use the subscript as the
+ subarray name instead of the `vname' field. This field
+ is not there for arrays created with NUMINT subscripts.
+ Thanks again to Hermann Peifer for the report.
+
2023-12-21 Arnold D. Robbins <arnold@skeeve.com>
Fix multidimensional array printing in the debugger, again.
diff --git a/debug.c b/debug.c
index 28211ab3..aee27b40 100644
--- a/debug.c
+++ b/debug.c
@@ -1145,7 +1145,13 @@ print_array(volatile NODE *arr, char *arr_name)
subs = list[i];
r = *assoc_lookup((NODE *) arr, subs);
if (r->type == Node_var_array) {
- ret = print_array(r, r->vname);
+ // 12/2023: Use sub->stptr here, not r->vname,
since
+ // a subarray could have been created via
+ // split() or some other mechanism where flags
has NUMINT in it.
+ // In this case, r->vname can be NULL, so pass
in the
+ // subscript itself. This should be fixed in
the code that
+ // builds such arrays.
+ ret = print_array(r, subs->stptr);
} else {
print_array_names(names, cur_name, out_fp);
gprintf(out_fp, "[\"%.*s\"] = ", (int)
subs->stlen, subs->stptr);
diff --git a/pc/ChangeLog b/pc/ChangeLog
index 1f401126..199b5ad7 100644
--- a/pc/ChangeLog
+++ b/pc/ChangeLog
@@ -1,3 +1,7 @@
+2023-12-24 Arnold D. Robbins <arnold@skeeve.com>
+
+ * Makefile.tst: Regenerated.
+
2023-12-21 Arnold D. Robbins <arnold@skeeve.com>
* Makefile.tst: Regenerated.
diff --git a/pc/Makefile.tst b/pc/Makefile.tst
index bf993437..4245f4f2 100644
--- a/pc/Makefile.tst
+++ b/pc/Makefile.tst
@@ -222,7 +222,7 @@ GAWK_EXT_TESTS = \
symtab11 symtab12 timeout typedregex1 typedregex2 typedregex3 \
typedregex4 typedregex5 typedregex6 typeof1 typeof2 typeof3 \
typeof4 typeof5 typeof6 unicode1 watchpoint1 \
- re_test typeof7 typeof8 dbugarray1 dbugarray2
+ re_test typeof7 typeof8 dbugarray1 dbugarray2 dbugarray3
ARRAYDEBUG_TESTS = arrdbg
EXTRA_TESTS = inftest regtest ignrcas3
@@ -244,7 +244,7 @@ SHLIB_TESTS = \
# List of the tests which should be run with --debug option:
NEED_DEBUG = dbugtypedre1 dbugtypedre2 dbugeval2 dbugeval3 dbugeval4 \
- dbugarray1 dbugarray2
+ dbugarray1 dbugarray2 dbugarray3
# List of the tests which should be run with --lint option:
@@ -3660,6 +3660,11 @@ dbugarray2:
@-AWKPATH="$(srcdir)" $(AWK) -f $@.awk --debug < "$(srcdir)"/$@.in
>_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
+dbugarray3:
+ @echo $@
+ @-AWKPATH="$(srcdir)" $(AWK) -f $@.awk --debug < "$(srcdir)"/$@.in
>_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
+ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
+
double1:
@echo $@ $(ZOS_FAIL)
@-AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE:
$$? >>_$@
diff --git a/test/ChangeLog b/test/ChangeLog
index 6ce1077d..fd9a9e87 100644
--- a/test/ChangeLog
+++ b/test/ChangeLog
@@ -1,3 +1,8 @@
+2023-12-24 Arnold D. Robbins <arnold@skeeve.com>
+
+ * Makefile.am (EXTRA_DIST): New test: dbugarray3.
+ * dbugarray3.awk, dbugarray3.in, dbugarray3.ok: New files.
+
2023-12-21 Arnold D. Robbins <arnold@skeeve.com>
* Makefile.am (EXTRA_DIST): New test: dbugarray2.
diff --git a/test/Makefile.am b/test/Makefile.am
index ee590467..eccd1e0c 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -250,6 +250,9 @@ EXTRA_DIST = \
dbugarray2.awk \
dbugarray2.in \
dbugarray2.ok \
+ dbugarray3.awk \
+ dbugarray3.in \
+ dbugarray3.ok \
dbugeval.in \
dbugeval.ok \
dbugeval2.awk \
@@ -1580,7 +1583,7 @@ GAWK_EXT_TESTS = \
symtab11 symtab12 timeout typedregex1 typedregex2 typedregex3 \
typedregex4 typedregex5 typedregex6 typeof1 typeof2 typeof3 \
typeof4 typeof5 typeof6 unicode1 watchpoint1 \
- re_test typeof7 typeof8 dbugarray1 dbugarray2
+ re_test typeof7 typeof8 dbugarray1 dbugarray2 dbugarray3
ARRAYDEBUG_TESTS = arrdbg
@@ -1605,7 +1608,7 @@ SHLIB_TESTS = \
# List of the tests which should be run with --debug option:
NEED_DEBUG = dbugtypedre1 dbugtypedre2 dbugeval2 dbugeval3 dbugeval4 \
- dbugarray1 dbugarray2
+ dbugarray1 dbugarray2 dbugarray3
# List of the tests which should be run with --lint option:
NEED_LINT = \
diff --git a/test/Makefile.in b/test/Makefile.in
index 9e421a35..6315701a 100644
--- a/test/Makefile.in
+++ b/test/Makefile.in
@@ -514,6 +514,9 @@ EXTRA_DIST = \
dbugarray2.awk \
dbugarray2.in \
dbugarray2.ok \
+ dbugarray3.awk \
+ dbugarray3.in \
+ dbugarray3.ok \
dbugeval.in \
dbugeval.ok \
dbugeval2.awk \
@@ -1844,7 +1847,7 @@ GAWK_EXT_TESTS = \
symtab11 symtab12 timeout typedregex1 typedregex2 typedregex3 \
typedregex4 typedregex5 typedregex6 typeof1 typeof2 typeof3 \
typeof4 typeof5 typeof6 unicode1 watchpoint1 \
- re_test typeof7 typeof8 dbugarray1 dbugarray2
+ re_test typeof7 typeof8 dbugarray1 dbugarray2 dbugarray3
ARRAYDEBUG_TESTS = arrdbg
EXTRA_TESTS = inftest regtest ignrcas3
@@ -1866,7 +1869,7 @@ SHLIB_TESTS = \
# List of the tests which should be run with --debug option:
NEED_DEBUG = dbugtypedre1 dbugtypedre2 dbugeval2 dbugeval3 dbugeval4 \
- dbugarray1 dbugarray2
+ dbugarray1 dbugarray2 dbugarray3
# List of the tests which should be run with --lint option:
@@ -5459,6 +5462,11 @@ dbugarray2:
@-AWKPATH="$(srcdir)" $(AWK) -f $@.awk --debug < "$(srcdir)"/$@.in
>_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
+dbugarray3:
+ @echo $@
+ @-AWKPATH="$(srcdir)" $(AWK) -f $@.awk --debug < "$(srcdir)"/$@.in
>_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
+ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
+
double1:
@echo $@ $(ZOS_FAIL)
@-AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE:
$$? >>_$@
diff --git a/test/Maketests b/test/Maketests
index 73be058a..98f6849e 100644
--- a/test/Maketests
+++ b/test/Maketests
@@ -2339,6 +2339,11 @@ dbugarray2:
@-AWKPATH="$(srcdir)" $(AWK) -f $@.awk --debug < "$(srcdir)"/$@.in
>_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
+dbugarray3:
+ @echo $@
+ @-AWKPATH="$(srcdir)" $(AWK) -f $@.awk --debug < "$(srcdir)"/$@.in
>_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
+ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
+
double1:
@echo $@ $(ZOS_FAIL)
@-AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE:
$$? >>_$@
diff --git a/test/dbugarray3.awk b/test/dbugarray3.awk
new file mode 100644
index 00000000..c179c1fe
--- /dev/null
+++ b/test/dbugarray3.awk
@@ -0,0 +1,18 @@
+function walk_array(arr, name, i)
+{
+ for (i in arr) {
+ if (isarray(arr[i]))
+ walk_array(arr[i], (name "[" i "]"))
+ else
+ printf("%s[%s] = %s\n", name, i, arr[i])
+ }
+}
+
+BEGIN {
+ $0 = "1 2 3"
+ split($0, a[0])
+ a[1][1]
+ split($0, a[1])
+
+ walk_array(a, "a")
+}
diff --git a/test/dbugarray3.in b/test/dbugarray3.in
new file mode 100644
index 00000000..5abbb9ae
--- /dev/null
+++ b/test/dbugarray3.in
@@ -0,0 +1,3 @@
+r
+p @a
+quit
diff --git a/test/dbugarray3.ok b/test/dbugarray3.ok
new file mode 100644
index 00000000..b5ee4a98
--- /dev/null
+++ b/test/dbugarray3.ok
@@ -0,0 +1,14 @@
+Starting program:
+a[0][1] = 1
+a[0][2] = 2
+a[0][3] = 3
+a[1][1] = 1
+a[1][2] = 2
+a[1][3] = 3
+Program exited normally with exit value: 0
+a["0"]["1"] = "1"
+a["0"]["2"] = "2"
+a["0"]["3"] = "3"
+a["1"]["1"] = "1"
+a["1"]["2"] = "2"
+a["1"]["3"] = "3"
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 7 +++++++
debug.c | 8 +++++++-
pc/ChangeLog | 4 ++++
pc/Makefile.tst | 9 +++++++--
test/ChangeLog | 5 +++++
test/Makefile.am | 7 +++++--
test/Makefile.in | 12 ++++++++++--
test/Maketests | 5 +++++
awklib/eg/lib/walkarray.awk => test/dbugarray3.awk | 9 +++++++++
test/dbugarray3.in | 3 +++
test/dbugarray3.ok | 14 ++++++++++++++
11 files changed, 76 insertions(+), 7 deletions(-)
copy awklib/eg/lib/walkarray.awk => test/dbugarray3.awk (70%)
create mode 100644 test/dbugarray3.in
create mode 100644 test/dbugarray3.ok
hooks/post-receive
--
gawk
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [SCM] gawk branch, gawk-5.3-stable, updated. gawk-4.1.0-5440-g8083ca90,
Arnold Robbins <=