recover some files changed by last merge
This commit is contained in:
parent
b8a57fe285
commit
2be19c40c1
16
COMPILE.TXT
16
COMPILE.TXT
|
@ -42,7 +42,7 @@ Capstone requires no prerequisite packages, so it is easy to compile & install.
|
|||
Users are then required to enter root password to copy Capstone into machine
|
||||
system directories.
|
||||
|
||||
Afterwards, run "./tests/test*" to see the tests disassembling sample code.
|
||||
Afterwards, run ./tests/test* to see the tests disassembling sample code.
|
||||
|
||||
|
||||
NOTE: The core framework installed by "./make.sh install" consist of
|
||||
|
@ -70,7 +70,8 @@ Capstone requires no prerequisite packages, so it is easy to compile & install.
|
|||
- To cross-compile Windows 64-bit binary, run:
|
||||
$ ./make.sh cross-win64
|
||||
|
||||
Resulted files "capstone.dll" and "tests/test*.exe" can then be used on Windows machine.
|
||||
Resulted files libcapstone.dll, libcapstone.dll.a & tests/test*.exe can then
|
||||
be used on Windows machine.
|
||||
|
||||
|
||||
|
||||
|
@ -84,6 +85,8 @@ Capstone requires no prerequisite packages, so it is easy to compile & install.
|
|||
- To compile Windows 64-bit binary under Cygwin, run
|
||||
$ ./make.sh cygwin-mingw64
|
||||
|
||||
Resulted files libcapstone.dll, libcapstone.dll.a & tests/test*.exe can then
|
||||
be used on Windows machine.
|
||||
|
||||
|
||||
(5) By default, "cc" (default C compiler on the system) is used as compiler.
|
||||
|
@ -100,6 +103,9 @@ Capstone requires no prerequisite packages, so it is easy to compile & install.
|
|||
|
||||
(6) Language bindings
|
||||
|
||||
So far, Python, Ruby, Ocaml, Java, C# and Go are supported by bindings. Look for
|
||||
the bindings under directory bindings/, and refer to README file of
|
||||
corresponding languages.
|
||||
So far, Python, Ocaml & Java are supported by bindings in the main code.
|
||||
Look for the bindings under directory bindings/, and refer to README file
|
||||
of corresponding languages.
|
||||
|
||||
Community also provide bindings for C#, Go, Ruby & Vala. Links to these can
|
||||
be found at address http://capstone-engine.org/download.html
|
||||
|
|
65
ChangeLog
65
ChangeLog
|
@ -1,11 +1,72 @@
|
|||
This file details the changelog of Capstone.
|
||||
|
||||
---------------------------------
|
||||
Version 2.0: January 22nd, 2014
|
||||
|
||||
[Version 2.0]: upcoming
|
||||
Release 2.0 deprecates verison 1.0 and brings a lot of crucial changes.
|
||||
|
||||
- See changelog at https://github.com/aquynh/capstone/wiki/ChangeLog
|
||||
[ API changes ]
|
||||
|
||||
- API version has been bumped to 2.0 (see cs_version() API)
|
||||
- New API cs_strerror(errno) returns a string describing error code given
|
||||
in its only argument.
|
||||
- cs_version() now returns combined version encoding both major & minor versions.
|
||||
- New option CS_OPT_MODE allows to change engine’s mode at run-time with
|
||||
cs_option().
|
||||
- New option CS_OPT_MEM allows to specify user-defined functions for dynamically
|
||||
memory management used internally by Capstone. This is useful to embed Capstone
|
||||
into special environments such as kernel or firware.
|
||||
- New API cs_support() can be used to check if this lib supports a particular
|
||||
architecture (this is necessary since we now allow to choose which architectures
|
||||
to compile in).
|
||||
- The detail option is OFF by default now. To get detail information, it should be
|
||||
explicitly turned ON. The details then can be accessed using cs_insn.detail
|
||||
pointer (to newly added structure cs_detail)
|
||||
|
||||
|
||||
[ Core changes ]
|
||||
|
||||
- On memory usage, Capstone uses much less memory, but a lot faster now.
|
||||
- User now can choose which architectures to be supported by modifying config.mk
|
||||
before compiling/installing.
|
||||
|
||||
|
||||
[ Architectures ]
|
||||
|
||||
- Arm
|
||||
- Support Big-Endian mode (besides Little-Endian mode).
|
||||
- Support friendly register, so instead of output sub "r12,r11,0x14",
|
||||
we have "sub ip,fp,0x14".
|
||||
- Arm64: support Big-Endian mode (besides Little-Endian mode).
|
||||
- PowerPC: newly added.
|
||||
- Mips: support friendly register, so instead of output "srl $2,$1,0x1f",
|
||||
we have "srl $v0,$at,0x1f".
|
||||
- X86: bug fixes.
|
||||
|
||||
|
||||
[ Python binding ]
|
||||
|
||||
- Python binding is vastly improved in performance: around 3 ~ 4 times faster
|
||||
than in 1.0.
|
||||
- Cython support has been added, which can further speed up over the default
|
||||
pure Python binding (up to 30% in some cases)
|
||||
- Function cs_disasm_quick() & Cs.disasm() now use generator (rather than a list)
|
||||
to return succesfully disassembled instructions. This improves the performance
|
||||
and reduces memory usage.
|
||||
|
||||
|
||||
[ Java binding ]
|
||||
|
||||
- Better performance & bug fixes.
|
||||
|
||||
|
||||
[ Miscellaneous ]
|
||||
|
||||
- Fixed some installation issues with Gentoo Linux.
|
||||
- Capstone now can easily compile/install on all *nix, including Linux, OSX,
|
||||
{Net, Free, Open}BSD & Solaris.
|
||||
|
||||
----------------------------------
|
||||
[Version 1.0]: December 18th, 2013
|
||||
|
||||
- Initial public release.
|
||||
|
|
7
README
7
README
|
@ -11,10 +11,11 @@ Capstone offers some unparalleled features:
|
|||
- Provide details on disassembled instruction (called “decomposer” by others).
|
||||
|
||||
- Provide semantics of the disassembled instruction, such as list of implicit
|
||||
registers read & written.
|
||||
registers read & written.
|
||||
|
||||
- Implemented in pure C language, with lightweight wrappers for C++, Python,
|
||||
Ruby, OCaml, C#, Java and Go available.
|
||||
- Implemented in pure C language, with lightweight wrappers for C++, C#, Go,
|
||||
Java, Ocaml, Python, Ruby & Vala ready (either available in main code,
|
||||
or provided externally by community).
|
||||
|
||||
- Native support for Windows & *nix platforms (with OSX, Linux, *BSD & Solaris
|
||||
have been confirmed).
|
||||
|
|
|
@ -36,6 +36,10 @@ all_tests = (
|
|||
)
|
||||
|
||||
|
||||
# for debugging
|
||||
def to_hex(s):
|
||||
return " ".join("0x" + "{0:x}".format(ord(c)).zfill(2) for c in s) # <-- Python 3 is OK
|
||||
|
||||
def get_code(f, size):
|
||||
code = f.read(size)
|
||||
if len(code) != size: # reached end-of-file?
|
||||
|
@ -55,9 +59,6 @@ def cs(md, code):
|
|||
print i
|
||||
|
||||
|
||||
md = Cs(CS_ARCH_X86, CS_MODE_32)
|
||||
md.detail = False
|
||||
|
||||
cfile = open(FILE)
|
||||
|
||||
for (arch, mode, comment, syntax) in all_tests:
|
||||
|
@ -80,12 +81,16 @@ for (arch, mode, comment, syntax) in all_tests:
|
|||
cfile.seek(0)
|
||||
for i in xrange(3):
|
||||
code = get_code(cfile, 128)
|
||||
#print to_hex(code)
|
||||
#print
|
||||
cs(md, code)
|
||||
|
||||
# start real benchmark
|
||||
c_t = 0
|
||||
for i in xrange(50000):
|
||||
code = get_code(cfile, 128)
|
||||
#print to_hex(code)
|
||||
#print
|
||||
|
||||
t1 = time()
|
||||
cs(md, code)
|
||||
|
|
Loading…
Reference in New Issue