llvm.mc.Disassembler.decode now yields the byte sequence which generated the instruction

added custom method to extra.h to return a PyBytes object
from the bytes read from MemoryObject.readBytes.

also moved the generic methods from StringRefMemoryObject
up to MemoryObject
This commit is contained in:
anthony cantor 2013-09-02 23:55:51 -06:00 • committed by Siu Kwan Lam
commit 43f7330fda
5 changed files with 78 additions and 19 deletions

View file

@ -659,7 +659,7 @@ def do_llvm_mc():
tm = TargetMachine.x86()
dasm = mc.Disassembler(tm)
for (offset, instr) in dasm.decode("c3", 0):
for (offset, data, instr) in dasm.decode("c3", 0):
pass
def main():