Mesa (master): llvmpipe: Stop disassembling when an unsupported opcode is found.

Jose Fonseca jrfonseca at kemper.freedesktop.org
Sat Dec 5 00:54:29 PST 2009


Module: Mesa
Branch: master
Commit: dd51b4f9091abf762e470f0cd4c802215a108290
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=dd51b4f9091abf762e470f0cd4c802215a108290

Author: José Fonseca <jfonseca at vmware.com>
Date:   Sat Dec  5 05:43:10 2009 +0000

llvmpipe: Stop disassembling when an unsupported opcode is found.

Otherwise the terminal gets full of garbage.

---

 src/gallium/drivers/llvmpipe/lp_bld_debug.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/src/gallium/drivers/llvmpipe/lp_bld_debug.c b/src/gallium/drivers/llvmpipe/lp_bld_debug.c
index 59d8f49..354b3af 100644
--- a/src/gallium/drivers/llvmpipe/lp_bld_debug.c
+++ b/src/gallium/drivers/llvmpipe/lp_bld_debug.c
@@ -115,7 +115,8 @@ lp_disassemble(const void* func)
          }
       }
 
-      if (ud_insn_off(&ud_obj) >= max_jmp_pc && ud_obj.mnemonic == UD_Iret)
+      if ((ud_insn_off(&ud_obj) >= max_jmp_pc && ud_obj.mnemonic == UD_Iret) ||
+           ud_obj.mnemonic == UD_Iinvalid)
          break;
    }
    debug_printf("\n");



More information about the mesa-commit mailing list