X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=src%2Fcommon%2Ffilter-grammar-test.cpp;h=e45bfa0eb76dd8926a713efebfea3ada0a0d711b;hb=HEAD;hp=bd8f2de7f148cbd128789770c2253dfdb004df4d;hpb=740da7d5000ca1ffdcf14bda5096bf7ccfb86bdd;p=lttng-tools.git diff --git a/src/common/filter-grammar-test.cpp b/src/common/filter-grammar-test.cpp index bd8f2de7f..e45bfa0eb 100644 --- a/src/common/filter-grammar-test.cpp +++ b/src/common/filter-grammar-test.cpp @@ -9,16 +9,16 @@ * */ +#include +#include +#include +#include + +#include #include -#include -#include #include -#include - -#include -#include -#include -#include +#include +#include /* For error.h */ int lttng_opt_quiet = 1; @@ -29,8 +29,7 @@ int main(int argc, char **argv) { struct filter_parser_ctx *ctx; int ret; - int print_xml = 0, generate_ir = 0, generate_bytecode = 0, - print_bytecode = 0; + int print_xml = 0, generate_ir = 0, generate_bytecode = 0, print_bytecode = 0; int argidx; for (argidx = 1; argidx < argc; argidx++) { @@ -108,7 +107,7 @@ int main(int argc, char **argv) } printf("done\n"); printf("Size of bytecode generated: %u bytes.\n", - bytecode_get_len(&ctx->bytecode->b)); + bytecode_get_len(&ctx->bytecode->b)); } if (print_bytecode) { @@ -118,14 +117,12 @@ int main(int argc, char **argv) bytecode_len = ctx->bytecode->b.reloc_table_offset; printf("Bytecode:\n"); for (i = 0; i < bytecode_len; i++) { - printf("0x%X ", - ((uint8_t *) ctx->bytecode->b.data)[i]); + printf("0x%X ", ((uint8_t *) ctx->bytecode->b.data)[i]); } printf("\n"); printf("Reloc table:\n"); for (i = bytecode_len; i < len;) { - printf("{ 0x%X, ", - *(uint16_t *) &ctx->bytecode->b.data[i]); + printf("{ 0x%X, ", *(uint16_t *) &ctx->bytecode->b.data[i]); i += sizeof(uint16_t); printf("%s } ", &((char *) ctx->bytecode->b.data)[i]); i += strlen(&((char *) ctx->bytecode->b.data)[i]) + 1;