This should be fine. A remote process would be (if I'm reading correctly) shipping the bytes to disassemble over the wire via an ArrayRef in this model. I think that's ok, but cc'ing Greg to double check. At the least, it's no different than what's going on right now.<div><br></div><div>The existing MemoryObject could be used to do all of that itself and keep a nice clean virtual interface, but we could also just redo that if we end up having a need.</div><div><br></div><div>Greg? Thoughts?<br><div><br></div><div>-eric<br><div><br><div class="gmail_quote">On Mon Nov 10 2014 at 10:22:56 AM Rafael Espíndola <<a href="mailto:rafael.espindola@gmail.com">rafael.espindola@gmail.com</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">The attached patches change  MCDisassembler::getInstruction to take an<br>
ArrayRef<uint8_t> instead of a MemoryObject.<br>
<br>
Even on X86 there is a maximum size an instruction can have. Given<br>
that, it seems way simpler and more efficient to just pass an ArrayRef<br>
to the disassembler instead of a MemoryObject and have it do a virtual<br>
call every time it wants some extra bytes.<br>
<br>
Cheers,<br>
Rafael<br>
______________________________<u></u>_________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@cs.uiuc.edu" target="_blank">llvm-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" target="_blank">http://lists.cs.uiuc.edu/<u></u>mailman/listinfo/llvm-commits</a><br>
</blockquote></div></div></div></div>