lkml.org 
[lkml]   [2011]   [Nov]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Subject[PATCH 3/4] [BUGFIX] x86/tools: Fix instruction decoder message output
    From
    Date
    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: Thomas Gleixner <tglx@linutronix.de>
    Cc: Ingo Molnar <mingo@redhat.com>
    Cc: "H. Peter Anvin" <hpa@zytor.com>
    ---
    arch/x86/tools/insn_sanity.c | 7 +++----
    1 files changed, 3 insertions(+), 4 deletions(-)

    diff --git a/arch/x86/tools/insn_sanity.c b/arch/x86/tools/insn_sanity.c
    index 334d9de..2025603 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)
    insn_init(&insn, insn_buf, x86_64);
    insn_get_length(&insn);

    - if (verbose && !insn_complete(&insn))
    - dump_stream(stdout, "Info: Found an undecodable input", i, insn_buf, &insn);
    -
    if (insn.next_byte <= insn.kaddr ||
    insn.kaddr + MAX_INSN_SIZE < insn.next_byte) {
    /* Access out-of-range memory */
    dump_stream(stdout, "Error: Found an access violation", i, insn_buf, &insn);
    errors++;
    - }
    + } else if (verbose && !insn_complete(&insn))
    + dump_stream(stdout, "Info: Found an undecodable input", i, insn_buf, &insn);
    +
    insns++;
    }



    \
     
     \ /
      Last update: 2011-11-21 10:11    [W:0.026 / U:1.320 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site