diff --git a/CHANGES b/CHANGES index 39adf50b01..7ccea5fff3 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,18 @@ +6.1.0-dev.416 | 2023-09-20 13:04:21 +0200 + + * Correctly compute name for spicyz export with debug log. (Benjamin Bannier, Corelight) + + In 36a6770e9891114b4f42dac3728040c67cc9411e we changed the way Spicy + fields exported as + record fields are represented. This broke the `zeek` debug log which + hardcoded a different representation. + + This patch brings the generation of the debug log in line with the + actual AST structure. We also enable debug logging in one test to + validate that it works, at least for the case we hit here. + + * Updating submodule(s) [nomail] (Benjamin Bannier, Corelight) + 6.1.0-dev.413 | 2023-09-19 19:56:44 +0200 * ci/benchmark: Send more Cirrus, GitHub and Zeek version information (Arne Welzel, Corelight) diff --git a/VERSION b/VERSION index 07248260ab..39e320b752 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -6.1.0-dev.413 +6.1.0-dev.416 diff --git a/src/spicy/spicyz/glue-compiler.cc b/src/spicy/spicyz/glue-compiler.cc index 26b35b8303..15dde32516 100644 --- a/src/spicy/spicyz/glue-compiler.cc +++ b/src/spicy/spicyz/glue-compiler.cc @@ -1318,14 +1318,7 @@ struct VisitorZeekType : hilti::visitor::PreOrder() - .ctor() - .as() - .value()[0] - .as() - .ctor() - .as() - .value())); + SPICY_DEBUG(hilti::util::fmt(" %s", f)); } else SPICY_DEBUG(hilti::util::fmt("Creating (empty) Zeek record type %s::%s", ns, local)); diff --git a/testing/btest/spicy/export-type-with-fields.zeek b/testing/btest/spicy/export-type-with-fields.zeek index 30274926c5..381cdbb372 100644 --- a/testing/btest/spicy/export-type-with-fields.zeek +++ b/testing/btest/spicy/export-type-with-fields.zeek @@ -1,6 +1,7 @@ # @TEST-REQUIRES: have-spicy # -# @TEST-EXEC: spicyz -do export.hlto export.spicy export.evt +# Running with `-D zeek` to excercise debug streams. +# @TEST-EXEC: spicyz -D zeek -do export.hlto export.spicy export.evt # @TEST-EXEC: zeek export.hlto %INPUT >>output # @TEST-EXEC: btest-diff output #