<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><br><div><br><div><div>On Mar 31, 2010, at 8:50 PM, Chris Lattner wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div>On Mar 31, 2010, at 6:13 PM, Sean Callanan wrote:</div><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><blockquote type="cite"><div>However, I don't see how error messages from the disassembler are going to be very useful.  Errors like:<br><br>Corrupt table!  Unknown modrm_type<br>Cannot have Mod = 0b11 and a SIB byte<br>Expected a REG or R/M encoding in fixupReg<br>No modifier but an operand expects one.<br><br>Are not going to mean anything to anyone.  I don't think there is such thing as a useful error message that can come out of a disassembler other than "unrecognized instruction".  Given this, I don't see the value in an error reporting api at all here.<font class="Apple-style-span"><font class="Apple-style-span" color="#144FAE"><br></font></font></div></blockquote><div><br></div>I'll just have error() call fprintf(stderr) unless NDEBUG is defined.  New patch attached.<br></div></div></blockquote></div><br><div>As daniel mentioned, nothing in lib can use printf.</div><div><br></div><div>Why not have this abort if assertions are enabled?  Causing a printout to happen (presumably as a debugging aid) does not make any sense if linked into a random app that uses the disassembler.</div><div><br></div><div>-Chris</div></div></blockquote></div><br></div></div></body></html>