projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
format-cpp: run clang-format in parallel
[lttng-tools.git]
/
src
/
common
/
filter-grammar-test.cpp
diff --git
a/src/common/filter-grammar-test.cpp
b/src/common/filter-grammar-test.cpp
index 75eb2c6ca38b30f243673cd9cbac0a214e79e559..e45bfa0eb76dd8926a713efebfea3ada0a0d711b 100644
(file)
--- a/
src/common/filter-grammar-test.cpp
+++ b/
src/common/filter-grammar-test.cpp
@@
-9,16
+9,16
@@
*
*/
*
*/
+#include <common/bytecode/bytecode.hpp>
+#include <common/compat/errno.hpp>
+#include <common/filter/filter-ast.hpp>
+#include <common/filter/filter-parser.hpp>
+
+#include <inttypes.h>
#include <stdio.h>
#include <stdio.h>
-#include <unistd.h>
-#include <string.h>
#include <stdlib.h>
#include <stdlib.h>
-#include <inttypes.h>
-
-#include <common/compat/errno.h>
-#include <common/bytecode/bytecode.h>
-#include <common/filter/filter-ast.h>
-#include <common/filter/filter-parser.hpp>
+#include <string.h>
+#include <unistd.h>
/* For error.h */
int lttng_opt_quiet = 1;
/* 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;
{
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++) {
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",
}
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) {
}
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++) {
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("\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;
i += sizeof(uint16_t);
printf("%s } ", &((char *) ctx->bytecode->b.data)[i]);
i += strlen(&((char *) ctx->bytecode->b.data)[i]) + 1;
This page took
0.025073 seconds
and
4
git commands to generate.