aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/tools
diff options
context:
space:
mode:
authorMasami Hiramatsu <masami.hiramatsu.pt@hitachi.com>2011-12-05 07:05:45 -0500
committerIngo Molnar <mingo@elte.hu>2011-12-05 08:53:17 -0500
commitbfbe9015de5c78d1808cd09526b9166b2e6aa440 (patch)
tree66f84498770e0d6d3e6c54252926085d769a8131 /arch/x86/tools
parent130b78b2bf16d5d89091db38374faef896360cf9 (diff)
x86/tools: Fix instruction decoder message output
Fix instruction decoder test (insn_sanity), so that it doesn't show both info and error messages twice on same instruction. (In that case, show only error message) Signed-off-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com> Cc: "H. Peter Anvin" <hpa@zytor.com> Cc: yrl.pp-manager.tt@hitachi.com Link: http://lkml.kernel.org/r/20111205120545.15475.7928.stgit@cloud Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/tools')
-rw-r--r--arch/x86/tools/insn_sanity.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/arch/x86/tools/insn_sanity.c b/arch/x86/tools/insn_sanity.c
index 334d9de7d0ca..20256037ac7d 100644
--- a/arch/x86/tools/insn_sanity.c
+++ b/arch/x86/tools/insn_sanity.c
@@ -257,15 +257,14 @@ int main(int argc, char **argv)
257 insn_init(&insn, insn_buf, x86_64); 257 insn_init(&insn, insn_buf, x86_64);
258 insn_get_length(&insn); 258 insn_get_length(&insn);
259 259
260 if (verbose && !insn_complete(&insn))
261 dump_stream(stdout, "Info: Found an undecodable input", i, insn_buf, &insn);
262
263 if (insn.next_byte <= insn.kaddr || 260 if (insn.next_byte <= insn.kaddr ||
264 insn.kaddr + MAX_INSN_SIZE < insn.next_byte) { 261 insn.kaddr + MAX_INSN_SIZE < insn.next_byte) {
265 /* Access out-of-range memory */ 262 /* Access out-of-range memory */
266 dump_stream(stdout, "Error: Found an access violation", i, insn_buf, &insn); 263 dump_stream(stdout, "Error: Found an access violation", i, insn_buf, &insn);
267 errors++; 264 errors++;
268 } 265 } else if (verbose && !insn_complete(&insn))
266 dump_stream(stdout, "Info: Found an undecodable input", i, insn_buf, &insn);
267
269 insns++; 268 insns++;
270 } 269 }
271 270