Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 169656
b: refs/heads/master
c: ce64c62
h: refs/heads/master
v: v3
  • Loading branch information
Masami Hiramatsu authored and Ingo Molnar committed Nov 19, 2009
1 parent 2d5a9af commit 1a84481
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 6b0cb5f9f7033c72b19697c33deab83f0dd9848d
refs/heads/master: ce64c62074d945fe5f8a7f01bdc30125f994ea67
17 changes: 11 additions & 6 deletions trunk/arch/x86/tools/test_get_len.c
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ int main(int argc, char **argv)
unsigned char insn_buf[16];
struct insn insn;
int insns = 0, c;
int warnings = 0;

parse_args(argc, argv);

Expand Down Expand Up @@ -151,18 +152,22 @@ int main(int argc, char **argv)
insn_init(&insn, insn_buf, x86_64);
insn_get_length(&insn);
if (insn.length != nb) {
fprintf(stderr, "Error: %s found a difference at %s\n",
warnings++;
fprintf(stderr, "Warning: %s found difference at %s\n",
prog, sym);
fprintf(stderr, "Error: %s", line);
fprintf(stderr, "Error: objdump says %d bytes, but "
fprintf(stderr, "Warning: %s", line);
fprintf(stderr, "Warning: objdump says %d bytes, but "
"insn_get_length() says %d\n", nb,
insn.length);
if (verbose)
dump_insn(stderr, &insn);
exit(2);
}
}
fprintf(stderr, "Succeed: decoded and checked %d instructions\n",
insns);
if (warnings)
fprintf(stderr, "Warning: decoded and checked %d"
" instructions with %d warnings\n", insns, warnings);
else
fprintf(stderr, "Succeed: decoded and checked %d"
" instructions\n", insns);
return 0;
}

0 comments on commit 1a84481

Please sign in to comment.