Lines Matching refs:fp
52 static void dump_field(FILE *fp, const char *name, const char *indent,
55 fprintf(fp, "%s.%s = {\n", indent, name);
56 fprintf(fp, "%s\t.value = %d, bytes[] = {%x, %x, %x, %x},\n",
59 fprintf(fp, "%s\t.got = %d, .nbytes = %d},\n", indent,
63 static void dump_insn(FILE *fp, struct insn *insn)
65 fprintf(fp, "Instruction = {\n");
66 dump_field(fp, "prefixes", "\t", &insn->prefixes);
67 dump_field(fp, "rex_prefix", "\t", &insn->rex_prefix);
68 dump_field(fp, "vex_prefix", "\t", &insn->vex_prefix);
69 dump_field(fp, "opcode", "\t", &insn->opcode);
70 dump_field(fp, "modrm", "\t", &insn->modrm);
71 dump_field(fp, "sib", "\t", &insn->sib);
72 dump_field(fp, "displacement", "\t", &insn->displacement);
73 dump_field(fp, "immediate1", "\t", &insn->immediate1);
74 dump_field(fp, "immediate2", "\t", &insn->immediate2);
75 fprintf(fp, "\t.attr = %x, .opnd_bytes = %d, .addr_bytes = %d,\n",
77 fprintf(fp, "\t.length = %d, .x86_64 = %d, .kaddr = %p}\n",
81 static void dump_stream(FILE *fp, const char *msg, unsigned long nr_iter,
86 fprintf(fp, "%s:\n", msg);
88 dump_insn(fp, insn);
90 fprintf(fp, "You can reproduce this with below command(s);\n");
93 fprintf(fp, " $ echo ");
95 fprintf(fp, " %02x", insn_buff[i]);
96 fprintf(fp, " | %s -i -\n", prog);
99 fprintf(fp, "Or \n");
101 fprintf(fp, " $ %s -s 0x%x,%lu\n", prog, seed, nr_iter);