aboutsummaryrefslogtreecommitdiffstats
path: root/epan
diff options
context:
space:
mode:
authorJoão Valverde <j@v6e.pt>2023-01-02 02:47:15 +0000
committerJoão Valverde <j@v6e.pt>2023-01-02 02:53:21 +0000
commitc762d8492bea567241268d5bcbff64b8ded7596a (patch)
treedd658eb8f2a25afaf960cf76908f5658a68aea40 /epan
parentf5bfe8978576d26e1ef0501d4f2a5aaa35af344a (diff)
dfilter: Improve debug format
Diffstat (limited to 'epan')
-rw-r--r--epan/dfilter/semcheck.c4
-rw-r--r--epan/dfilter/syntax-tree.c13
2 files changed, 9 insertions, 8 deletions
diff --git a/epan/dfilter/semcheck.c b/epan/dfilter/semcheck.c
index abcac8c6e9..cf697ebd6e 100644
--- a/epan/dfilter/semcheck.c
+++ b/epan/dfilter/semcheck.c
@@ -1556,7 +1556,7 @@ dfw_semcheck(dfwork_t *dfw)
{
volatile gboolean ok_filter = TRUE;
- ws_noisy("Starting semantic check (dfw = %p)", dfw);
+ ws_debug("Starting semantic check (dfw = %p)", dfw);
/* Instead of having to check for errors at every stage of
* the semantic-checking, the semantic-checking code will
@@ -1569,7 +1569,7 @@ dfw_semcheck(dfwork_t *dfw)
}
ENDTRY;
- ws_noisy("Semantic check (dfw = %p) returns %s",
+ ws_debug("Semantic check (dfw = %p) returns %s",
dfw, ok_filter ? "TRUE" : "FALSE");
return ok_filter;
diff --git a/epan/dfilter/syntax-tree.c b/epan/dfilter/syntax-tree.c
index 06ba8f92ee..c0f1207e95 100644
--- a/epan/dfilter/syntax-tree.c
+++ b/epan/dfilter/syntax-tree.c
@@ -333,12 +333,13 @@ sprint_node(stnode_t *node)
{
wmem_strbuf_t *buf = wmem_strbuf_new(NULL, NULL);
- wmem_strbuf_append_printf(buf, "stnode{ ");
- wmem_strbuf_append_printf(buf, "magic=0x%"PRIx32", ", node->magic);
- wmem_strbuf_append_printf(buf, "type=%s, ", stnode_type_name(node));
- wmem_strbuf_append_printf(buf, "data=<%s>, ", stnode_todebug(node));
- wmem_strbuf_append_printf(buf, "location=%ld:%zu",
+ wmem_strbuf_append_printf(buf, "{ ");
+ wmem_strbuf_append_printf(buf, "magic = 0x%"PRIx32", ", node->magic);
+ wmem_strbuf_append_printf(buf, "type = %s, ", stnode_type_name(node));
+ wmem_strbuf_append_printf(buf, "data = %s, ", stnode_todebug(node));
+ wmem_strbuf_append_printf(buf, "location = %ld:%zu",
node->location.col_start, node->location.col_len);
+ wmem_strbuf_append_printf(buf, " }");
return wmem_strbuf_finalize(buf);
}
@@ -390,7 +391,7 @@ log_test_full(enum ws_log_level level,
rhs = sprint_node(st_rhs);
ws_log_write_always_full(WS_LOG_DOMAIN, level, file, line, func,
- "%s: LHS = %s; RHS = %s",
+ "%s:\n LHS = %s\n RHS = %s",
stnode_todebug(node),
lhs ? lhs : "NULL",
rhs ? rhs : "NULL");