summaryrefslogtreecommitdiff
path: root/src/analysis/scan/patterns
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2023-09-12 21:55:01 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2023-09-12 21:55:01 (GMT)
commit31131323ee211aed77d01bdac61ad371524620a2 (patch)
tree3fad07f6b53b62e60b4bfbb572512e6865a63281 /src/analysis/scan/patterns
parent6f160d1b1e1bfdd06414d5b6c49a0c9d9fc8a830 (diff)
Delete lots of debug output.
Diffstat (limited to 'src/analysis/scan/patterns')
-rw-r--r--src/analysis/scan/patterns/token.c2
-rw-r--r--src/analysis/scan/patterns/tokens/node.c8
-rw-r--r--src/analysis/scan/patterns/tokens/nodes/any.c3
-rw-r--r--src/analysis/scan/patterns/tokens/nodes/masked.c7
4 files changed, 2 insertions, 18 deletions
diff --git a/src/analysis/scan/patterns/token.c b/src/analysis/scan/patterns/token.c
index 1b2ee8a..f44680c 100644
--- a/src/analysis/scan/patterns/token.c
+++ b/src/analysis/scan/patterns/token.c
@@ -265,8 +265,6 @@ bool g_string_token_enroll(GStringToken *token, GScanContext *context, GEngineBa
result = g_scan_token_node_enroll(token->root, context, backend, maxsize, &token->slow);
- printf("need backward? %d\n", token->need_backward);
-
return result;
}
diff --git a/src/analysis/scan/patterns/tokens/node.c b/src/analysis/scan/patterns/tokens/node.c
index 1354fff..cdbad4f 100644
--- a/src/analysis/scan/patterns/tokens/node.c
+++ b/src/analysis/scan/patterns/tokens/node.c
@@ -267,8 +267,6 @@ bool g_scan_token_node_setup_tree(GScanTokenNode *node)
g_scan_token_node_set_flags(main, STNF_MAIN);
- printf("main : %p (%s)\n", main, G_OBJECT_TYPE_NAME(main));
-
result = (main != node/*points.first_node*/);
return result;
@@ -365,9 +363,6 @@ void _g_scan_token_node_check_forward(const GScanTokenNode *node, GScanContext *
*skip = false;
}
- printf("Checking forward... node=%p / %s skip=%d main=%u\n",
- node, G_OBJECT_TYPE_NAME(node), *skip, (node->flags & STNF_MAIN) == STNF_MAIN);
-
class = G_SCAN_TOKEN_NODE_GET_CLASS(node);
class->check_forward(node, context, content, matches, offset, not, skip);
@@ -484,9 +479,6 @@ void _g_scan_token_node_check_backward(const GScanTokenNode *node, GScanContext
{
GScanTokenNodeClass *class; /* Classe de l'instance */
- printf("Checking backward... node=%p / %s skip=%d main=%u\n",
- node, G_OBJECT_TYPE_NAME(node), *skip, (node->flags & STNF_MAIN) == STNF_MAIN);
-
class = G_SCAN_TOKEN_NODE_GET_CLASS(node);
class->check_backward(node, context, content, matches, offset, not, skip);
diff --git a/src/analysis/scan/patterns/tokens/nodes/any.c b/src/analysis/scan/patterns/tokens/nodes/any.c
index af2ae29..e5fb1d7 100644
--- a/src/analysis/scan/patterns/tokens/nodes/any.c
+++ b/src/analysis/scan/patterns/tokens/nodes/any.c
@@ -333,10 +333,11 @@ static void g_scan_token_node_any_check_forward(const GScanTokenNodeAny *node, G
// TODO : compléter les intervales éventuels déjà en place
+ /*
printf("[i] create hole: %llx <-> %llx\n",
(unsigned long long)node->min,
(unsigned long long)node->max);
-
+ */
if (node->has_max)
diff --git a/src/analysis/scan/patterns/tokens/nodes/masked.c b/src/analysis/scan/patterns/tokens/nodes/masked.c
index 25f0315..8765b1d 100644
--- a/src/analysis/scan/patterns/tokens/nodes/masked.c
+++ b/src/analysis/scan/patterns/tokens/nodes/masked.c
@@ -721,9 +721,6 @@ static void g_scan_token_node_masked_check_backward(const GScanTokenNodeMasked *
before = pending->start - matches->content_start;
- printf(" (masked) pending: %u - len=%u\n",
- (unsigned int)pending->start, (unsigned int)node->len);
-
new_begin = pending->start - node->len;
if (ocount > 0)
@@ -796,10 +793,6 @@ static void g_scan_token_node_masked_check_backward(const GScanTokenNodeMasked *
status = check_scan_token_node_masked_content(node->bytes, node->len, new_begin, content);
- printf(" (masked) found new @ %llx ? %d\n",
- (unsigned long long)new_begin, status);
-
-
if ((status && !not) || (!status && not))
extend_pending_match_beginning(matches, p, new_begin);