#4587·zeek

Built-in spicy analyzers don't contain debug instrumentation, even if Zeek is built in debug mode

Author: 0xxonCreated Jun 18, 2025Updated Sep 28, 2026
LabelsGood First IssueArea: Build/PlatformArea: Spicy

Currently, spicy analyzers in the Zeek tree will never contain debug instrumentation, even if Zeek itself is built in debug mode.

That obviously makes debugging them harder.

I currently use this cmake patch locally, which just unconditionally enables debug instrumentation:

patch
--- a/BuiltInSpicyAnalyzer.cmake
+++ b/BuiltInSpicyAnalyzer.cmake
@@ -85,7 +85,7 @@ function (spicy_add_analyzer)
             COMMAND
                 ${CMAKE_COMMAND} -E env
                 "ZEEK_SPICY_LIBRARY_PATH=${PROJECT_SOURCE_DIR}/scripts/spicy"
-                ASAN_OPTIONS=$ENV{ASAN_OPTIONS}:detect_leaks=0 $<TARGET_FILE:spicyz> -L
+                ASAN_OPTIONS=$ENV{ASAN_OPTIONS}:detect_leaks=0 $<TARGET_FILE:spicyz> -d -L
                 ${spicy_SOURCE_DIR}/hilti/lib -L ${spicy_SOURCE_DIR}/spicy/lib -x
                 ${CMAKE_CURRENT_BINARY_DIR}/${NAME_LOWER} ${SPICYZ_FLAGS} ${SPICY_ANALYZER_SOURCES}
             WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})