<html><head><meta http-equiv="Content-Type" content="text/html charset=iso-8859-1"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">Hi Yue,<div><br></div><div>You may want to have a look to llvm-objdump tool.</div><div><br></div><div>You will find some good hints on how to use/build the MCDisassembler to decode the MCInst from a stream of bytes.</div><div>More specifically, MCDisassembler::getInstruction does the decode part.</div><div><br></div><div><span style="orphans: 2; text-align: -webkit-auto; widows: 2;">-Quentin</span></div><div>
<br><div><div>On Sep 18, 2013, at 2:07 PM, Yue Chen <<a href="mailto:ycyc54321@gmail.com">ycyc54321@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div dir="ltr"><br><div>Hi, Dear LLVM Dev Group,</div><div><br></div><div>I am doing an LLVM project aimed to disassemble an ARM ELF binary executable to the MCInst format, inserting some instructions or doing some modification, and re-assemble the MCInst to an ELF binary.</div>


<div><br></div><div>As I used the llvm-mc, it seems to only have the option "llvm-mc -disassemble", which reads strings and output strings. Is there any command or function that can take a binary, and translates it to the MCInst format, finally translating back to a binary? </div>


<div><br></div><div>Thanks a million for your help.</div><div><br></div><div>Best,</div></div>
_______________________________________________<br>LLVM Developers mailing list<br><a href="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</a>         <a href="http://llvm.cs.uiuc.edu">http://llvm.cs.uiuc.edu</a><br><a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br></blockquote></div><br></div></body></html>