From 196e531f00db3dcc3faadb497ba677f4a52c4e87 Mon Sep 17 00:00:00 2001 From: Francis Deslauriers Date: Mon, 11 May 2020 16:09:20 -0400 Subject: [PATCH] bytecode: set register type to `REG_PTR` even if not used There was no need to set the field when using filter as the next instruction would assume that the top of stack is a `REG_PTR`. With the upcoming capture feature, we need to ensure this field is consistent for extraction. Signed-off-by: Francis Deslauriers Signed-off-by: Mathieu Desnoyers Change-Id: I9c60416dd452949e584fadd70b15cdc3d402aa46 --- src/lttng-filter-interpreter.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/lttng-filter-interpreter.c b/src/lttng-filter-interpreter.c index 3273d4a0..69db9494 100644 --- a/src/lttng-filter-interpreter.c +++ b/src/lttng-filter-interpreter.c @@ -429,6 +429,9 @@ static int dynamic_get_index(struct lttng_probe_ctx *lttng_probe_ctx, stack_top->u.ptr.field = gid->field; break; } + + stack_top->type = REG_PTR; + return 0; end: -- 2.34.1