bytecode: propagate `rev_bo` of element
[lttng-modules.git] / lttng-filter-interpreter.c
index 6e5a5139e3dfd285fe0500c2558b8c1982fb49ba..8c870e14723db99d6d7e341cbf0e25fb776bff75 100644 (file)
@@ -7,6 +7,7 @@
  * Copyright (C) 2010-2016 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
  */
 
+#include <wrapper/compiler_attributes.h>
 #include <wrapper/uaccess.h>
 #include <wrapper/objtool.h>
 #include <wrapper/types.h>
@@ -289,6 +290,7 @@ static int context_get_index(struct lttng_probe_ctx *lttng_probe_ctx,
                        ptr->u.u64 = v.s64;     /* Cast. */
                        ptr->ptr = &ptr->u.u64;
                }
+               ptr->rev_bo = field->type.u.basic.integer.reverse_byte_order;
                break;
        case atype_enum:
        {
@@ -305,6 +307,7 @@ static int context_get_index(struct lttng_probe_ctx *lttng_probe_ctx,
                        ptr->u.u64 = v.s64;     /* Cast. */
                        ptr->ptr = &ptr->u.u64;
                }
+               ptr->rev_bo = itype->reverse_byte_order;
                break;
        }
        case atype_array:
@@ -419,7 +422,8 @@ static int dynamic_get_index(struct lttng_probe_ctx *lttng_probe_ctx,
                }
                break;
        case LOAD_ROOT_CONTEXT:
-       case LOAD_ROOT_APP_CONTEXT:     /* Fall-through */
+               lttng_fallthrough;
+       case LOAD_ROOT_APP_CONTEXT:
        {
                ret = context_get_index(lttng_probe_ctx,
                                &stack_top->u.ptr,
@@ -437,6 +441,7 @@ static int dynamic_get_index(struct lttng_probe_ctx *lttng_probe_ctx,
                stack_top->u.ptr.type = LOAD_OBJECT;
                /* field is only used for types nested within variants. */
                stack_top->u.ptr.field = NULL;
+               stack_top->u.ptr.rev_bo = gid->elem.rev_bo;
                break;
        }
        return 0;
This page took 0.024246 seconds and 4 git commands to generate.