llvmpipe: Stop disassembling when an unsupported opcode is found.
authorJosé Fonseca <jfonseca@vmware.com>
Sat, 5 Dec 2009 05:43:10 +0000 (05:43 +0000)
committerJosé Fonseca <jfonseca@vmware.com>
Sat, 5 Dec 2009 05:43:10 +0000 (05:43 +0000)
Otherwise the terminal gets full of garbage.

src/gallium/drivers/llvmpipe/lp_bld_debug.c

index 59d8f492e60af0af4585c1fcaa5ac95f8154e5f6..354b3af49e1a41f00ff3746dd72b26091c584796 100644 (file)
@@ -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");