Skip to content

Commit

Permalink
Fix #764: Support Capstone 3.0.x and 4.0.x part 3
Browse files Browse the repository at this point in the history
  • Loading branch information
JonathanSalwan committed Feb 18, 2019
1 parent a24a716 commit f2284a9
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .appveyor.yml
Expand Up @@ -13,7 +13,7 @@ configuration:
clone_folder: c:\projects\triton

environment:
CAPSTONE_INCLUDE_DIRS: c:\projects\triton\build\capstone-4.0.1\include
CAPSTONE_INCLUDE_DIRS: c:\projects\triton\build\capstone-4.0.1\include\capstone

matrix:
- platform: Win32
Expand Down
21 changes: 21 additions & 0 deletions src/libtriton/bindings/python/objects/pyAstContext.cpp
Expand Up @@ -17,6 +17,27 @@



/* setup doctest context
>>> from triton import REG, TritonContext, ARCH, Instruction, AST_REPRESENTATION
>>> ctxt = TritonContext()
>>> ctxt.setArchitecture(ARCH.X86_64)
>>> opcode = "\x48\x31\xD0"
>>> inst = Instruction()
>>> inst.setOpcode(opcode)
>>> inst.setAddress(0x400000)
>>> ctxt.setConcreteRegisterValue(ctxt.registers.rax, 12345)
>>> ctxt.setConcreteRegisterValue(ctxt.registers.rdx, 67890)
>>> ctxt.processing(inst)
True
>>> print inst
0x400000: xor rax, rdx
*/

/*! \page py_AstContext_page AstContext
\brief [**python api**] All information about the AstContext python object.
Expand Down

0 comments on commit f2284a9

Please sign in to comment.