Lines Matching +full:no +full:- +full:pc +full:- +full:write
1 // SPDX-License-Identifier: GPL-2.0-only
11 * 2) Load a BPF filter (e.g. `tcpdump -p -n -s 0 -i eth1 host 192.168.20.0/24`)
12 * 3) Run e.g. `bpf_jit_disasm -o` to read out the last JIT code
24 #include <dis-asm.h>
31 #include <tools/dis-asm-compat.h>
42 tpath[size - 1] = 0; in get_exec_path()
55 int count, i, pc = 0; in get_asm_insns() local
89 printf("%4x:\t", pc); in get_asm_insns()
91 count = disassemble(pc, &info); in get_asm_insns()
96 printf("%02x ", (uint8_t) image[pc + i]); in get_asm_insns()
100 pc += count; in get_asm_insns()
101 } while(count > 0 && pc < len); in get_asm_insns()
149 ret = read(fd, buff, len - 1); in get_flog_buff()
205 ptr = haystack + off - (pmatch[0].rm_eo - pmatch[0].rm_so); in get_last_jit_image()
236 ulen--; in get_last_jit_image()
258 printf(" -o Also display related opcodes (default: off).\n"); in usage()
259 printf(" -O <file> Write binary image of code to file, don't disassemble to stdout.\n"); in usage()
260 printf(" -f <file> Read last image dump from file or stdin (default: klog).\n"); in usage()
261 printf(" -h Display this help.\n"); in usage()
274 while ((opt = getopt(argc, argv, "of:O:")) != -1) { in main()
287 return -1; in main()
296 return -1; in main()
301 fprintf(stderr, "No JIT image found!\n"); in main()
317 nr = write(ofd, pos, len); in main()
319 fprintf(stderr, "Could not write data to %s: ", ofile); in main()
323 len -= nr; in main()