Go to file
Kalmalyzer 9944bfde76 M68K: Branch targets are a separate addressing mode; PC relative displacements printed as target addresses (#1068)
* Branch targets are a separate addressing mode

Branch targets are relative displacements that identify code locations. These are neither .w nor .l nor immediates. This change removes the immediate #s before branch target addresses in disassembly, and represents the actual branch instructions more accurately in the cs_m68k_op datastructure.

M68K Python bindings have also been updated.

* m68k_inst.pc handles better; print target for PC relative offsets

Previous changes to branch operations relied on m68k_inst.pc pointing to (start of instruction + 2). This was not the case - it pointed to the end of the current instruction. This change makes it so that m68k_inst.pc points to (start of instruction), which is simple to work with.

It also changes printing of PC relative offsets to print the absolute target address, which is consistent with how most 68000 assemblers & disassemblers behave.
2018-01-06 20:13:41 +08:00
arch M68K: Branch targets are a separate addressing mode; PC relative displacements printed as target addresses (#1068) 2018-01-06 20:13:41 +08:00
bindings M68K: Branch targets are a separate addressing mode; PC relative displacements printed as target addresses (#1068) 2018-01-06 20:13:41 +08:00
contrib fix typo, style 2016-09-28 07:33:14 -07:00
cstool sparc: change imm type from int32_t to int64_t 2017-12-27 14:46:47 +08:00
docs fix typo, style 2016-09-28 07:33:14 -07:00
include M68K: Branch targets are a separate addressing mode; PC relative displacements printed as target addresses (#1068) 2018-01-06 20:13:41 +08:00
msvc Compile cstool on Windows using Microsoft Visual Studio (VS) (#928) 2017-05-17 08:33:12 +07:00
packages package: update Brew formula (copied from upstream) 2015-02-24 20:49:47 +08:00
suite M680X: Target ready for pull request (#1034) 2017-10-21 21:44:36 +08:00
tests sparc: change imm type from int32_t to int64_t 2017-12-27 14:46:47 +08:00
windows provide a validity check to prevent against Integer overflow conditions (#870) 2017-03-13 23:35:29 +08:00
windowsce Added documentation for building for Windows CE. 2016-04-12 09:26:47 +02:00
xcode macOS framework - Added a module map for Swift/Objective-C. (#1057) 2017-11-28 00:46:18 +08:00
.appveyor.yml rename appveyor.yml to .appveyor.yml 2016-03-15 00:01:10 +08:00
.gitignore M680X: Target ready for pull request (#1034) 2017-10-21 21:44:36 +08:00
.travis.yml Revert "cleanup travis and use environment variables" 2017-10-09 08:53:16 +08:00
CMakeLists.txt M680X: Target ready for pull request (#1034) 2017-10-21 21:44:36 +08:00
COMPILE.TXT Added documentation for building for Windows CE. 2016-04-12 09:26:47 +02:00
COMPILE_CMAKE.TXT M680X: Target ready for pull request (#1034) 2017-10-21 21:44:36 +08:00
COMPILE_MSVC.TXT fix typo, style 2016-09-28 07:33:14 -07:00
CREDITS.TXT M680X: Target ready for pull request (#1034) 2017-10-21 21:44:36 +08:00
ChangeLog Java: Support cs_strerror() and cs_regs_access() 2016-11-27 13:59:12 +01:00
HACK.TXT M680X: Target ready for pull request (#1034) 2017-10-21 21:44:36 +08:00
LEB128.h port Windows driver support 2016-05-11 21:48:32 -07:00
LICENSE.TXT a a newline to LICENSE.TXT 2014-02-20 17:08:28 +08:00
LICENSE_LLVM.TXT initial import 2013-11-27 12:11:31 +08:00
MCDisassembler.h 2015 2015-03-04 17:45:23 +08:00
MCFixedLenDisassembler.h 2015 2015-03-04 17:45:23 +08:00
MCInst.c Fix undefined behavior when disassembling ud0 x86 instructions (#1032) 2017-10-13 09:04:16 +08:00
MCInst.h x86: add UD0 instruction 2017-05-07 11:17:23 +08:00
MCInstrDesc.c 2015 2015-03-04 17:45:23 +08:00
MCInstrDesc.h port Windows driver support 2016-05-11 21:48:32 -07:00
MCRegisterInfo.c mips: update core 2015-03-02 15:12:42 +08:00
MCRegisterInfo.h port Windows driver support 2016-05-11 21:48:32 -07:00
Makefile more makefile cleanup (#1039) 2017-10-21 21:47:38 +08:00
MathExtras.h Merge remote-tracking branch 'upstream/next' into next 2016-05-11 22:52:34 -07:00
README.md M680X: Target ready for pull request (#1034) 2017-10-21 21:44:36 +08:00
RELEASE_NOTES RELEASE_NOTES 2015-03-12 00:11:03 +08:00
SStream.c fix signed int overflow reported by Google AutoFuzz at #1060, #1061, #1062 2017-12-15 10:17:56 +08:00
SStream.h Added support for building binaries for Windows CE 7 on ARMv7 (a.k.a., Windows Embedded Compact 7) and for Windows CE 8 on ARMv7 (a.k.a., Windows Embedded Compact 2013). 2016-04-07 17:05:00 +02:00
TODO TODO 2015-03-11 11:33:00 +08:00
capstone.pc.in fixed hardcoded paths with variables. (#1018) 2017-09-27 09:32:54 +08:00
config.mk M680X: Target ready for pull request (#1034) 2017-10-21 21:44:36 +08:00
cs.c M680X: Target ready for pull request (#1034) 2017-10-21 21:44:36 +08:00
cs_priv.h M680X: Target ready for pull request (#1034) 2017-10-21 21:44:36 +08:00
functions.mk Makefile: put common functions into functions.mk 2014-05-01 22:53:52 +08:00
make.sh Add posibility to disable universal build for osx 2017-09-05 21:51:07 +07:00
nmake-x86.bat fix nmake-x86.bat 2017-05-21 21:33:47 -07:00
nmake.bat add nmake.bat 2017-03-13 15:07:28 +08:00
pkgconfig.mk Python: Automatically conform to PEP440 for version numbers. ported from Unicorn Python binding 2017-02-01 13:23:15 +08:00
utils.c Fix undefined behavior when disassembling ud0 x86 instructions (#1032) 2017-10-13 09:04:16 +08:00
utils.h M680X: Target ready for pull request (#1034) 2017-10-21 21:44:36 +08:00

README.md

Capstone Engine

Build Status Build status

Capstone is a disassembly framework with the target of becoming the ultimate disasm engine for binary analysis and reversing in the security community.

Created by Nguyen Anh Quynh, then developed and maintained by a small community, Capstone offers some unparalleled features:

  • Support multiple hardware architectures: ARM, ARM64 (ARMv8), M68K, Mips, PPC, Sparc, SystemZ, TMS320C64X, M680X, XCore and X86 (including X86_64).

  • Having clean/simple/lightweight/intuitive architecture-neutral API.

  • Provide details on disassembled instruction (called “decomposer” by others).

  • Provide semantics of the disassembled instruction, such as list of implicit registers read & written.

  • Implemented in pure C language, with lightweight bindings for PHP, PowerShell, Emacs, Haskell, Perl, Python, Ruby, C#, NodeJS, Java, GO, C++, OCaml, Lua, Rust, Delphi, Free Pascal & Vala ready either in main code, or provided externally by the community).

  • Native support for all popular platforms: Windows, Mac OSX, iOS, Android, Linux, *BSD, Solaris, etc.

  • Thread-safe by design.

  • Special support for embedding into firmware or OS kernel.

  • High performance & suitable for malware analysis (capable of handling various X86 malware tricks).

  • Distributed under the open source BSD license.

Further information is available at http://www.capstone-engine.org

Compile

See COMPILE.TXT file for how to compile and install Capstone.

Documentation

See docs/README for how to customize & program your own tools with Capstone.

Hack

See HACK.TXT file for the structure of the source code.

License

This project is released under the BSD license. If you redistribute the binary or source code of Capstone, please attach file LICENSE.TXT with your products.