-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update v6 to have Debian Package release
- Loading branch information
1 parent
0a29bf8
commit fa1f5e4
Showing
11 changed files
with
232 additions
and
82 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,108 @@ | ||
Code structure | ||
-------------- | ||
|
||
Capstone source is organized as followings. | ||
|
||
. <- core engine + README + COMPILE.TXT etc | ||
├── arch <- code handling disasm engine for each arch | ||
│ ├── AArch64 <- ARM64 (aka ARMv8) engine | ||
│ ├── ARM <- ARM engine | ||
│ ├── BPF <- Berkeley Packet Filter engine | ||
│ ├── EVM <- Ethereum engine | ||
│ ├── M680X <- M680X engine | ||
│ ├── M68K <- M68K engine | ||
│ ├── Mips <- Mips engine | ||
│ ├── MOS65XX <- MOS65XX engine | ||
│ ├── PowerPC <- PowerPC engine | ||
│ ├── RISCV <- RISCV engine | ||
│ ├── SH <- SH engine | ||
│ ├── Sparc <- Sparc engine | ||
│ ├── SystemZ <- SystemZ engine | ||
│ ├── TMS320C64x <- TMS320C64x engine | ||
│ ├── TriCore <- TriCore engine | ||
│ └── WASM <- WASM engine | ||
├── bindings <- all bindings are under this dir | ||
│ ├── java <- Java bindings + test code | ||
│ ├── ocaml <- Ocaml bindings + test code | ||
│ └── python <- Python bindings + test code | ||
├── contrib <- Code contributed by community to help Capstone integration | ||
├── cstool <- Cstool | ||
├── docs <- Documentation | ||
├── include <- API headers in C language (*.h) | ||
├── msvc <- Microsoft Visual Studio support (for Windows compile) | ||
├── packages <- Packages for Linux/OSX/BSD. | ||
├── windows <- Windows support (for Windows kernel driver compile) | ||
├── suite <- Development test tools - for Capstone developers only | ||
├── tests <- Test code (in C language) | ||
└── xcode <- Xcode support (for MacOSX compile) | ||
|
||
|
||
Follow instructions in COMPILE.TXT for how to compile and run test code. | ||
|
||
Note: if you find some strange bugs, it is recommended to firstly clean | ||
the code and try to recompile/reinstall again. This can be done with: | ||
|
||
$ ./make.sh | ||
$ sudo ./make.sh install | ||
|
||
Then test Capstone with cstool, for example: | ||
|
||
$ cstool x32 "90 91" | ||
|
||
At the same time, for Java/Ocaml/Python bindings, be sure to always use | ||
the bindings coming with the core to avoid potential incompatibility issue | ||
with older versions. | ||
See bindings/<language>/README for detail instructions on how to compile & | ||
install the bindings. | ||
|
||
|
||
Coding style | ||
------------ | ||
- C code follows Linux kernel coding style, using tabs for indentation. | ||
- Python code uses 4 spaces for indentation. | ||
|
||
|
||
Adding an architecture | ||
---------------------- | ||
|
||
Obviously, you first need to write all the logic and put it in a new directory arch/newarch | ||
Then, you have to modify other files. | ||
(You can look for one architecture such as EVM in these files to get what you need to do) | ||
|
||
Integrate: | ||
- cs.c | ||
- cstool/cstool.c | ||
- cstool/cstool_newarch.c: print the architecture specific details | ||
- include/capstone/capstone.h | ||
- include/capstone/newarch.h: create this file to export all specifics about the new architecture | ||
|
||
Compile: | ||
- CMakeLists.txt | ||
- Makefile | ||
- config.mk | ||
|
||
Tests: | ||
- tests/Makefile | ||
- tests/test_basic.c | ||
- tests/test_detail.c | ||
- tests/test_iter.c | ||
- tests/test_newarch.c | ||
- suite/fuzz/platform.c: add the architecture and its modes to the list of fuzzed platforms | ||
- suite/capstone_get_setup.c | ||
- suite/MC/newarch/mode.mc: samples | ||
- suite/test_corpus.py: correspondence between architecture and mode as text and architecture number for fuzzing | ||
|
||
Bindings: | ||
- bindings/Makefile | ||
- bindings/const_generator.py: add the header file and the architecture | ||
- bindings/python/Makefile | ||
- bindings/python/capstone/__init__.py | ||
- bindings/python/capstone/newarch.py: define the python structures | ||
- bindings/python/capstone/newarch_const.py: generate this file | ||
- bindings/python/test_newarch.py: create a basic decoding test | ||
- bindings/python/test_all.py | ||
|
||
Docs: | ||
- README.md | ||
- HACK.txt | ||
- CREDITS.txt: add your name |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
This is the software license for Capstone disassembly framework. | ||
Capstone has been designed & implemented by Nguyen Anh Quynh <aquynh@gmail.com> | ||
|
||
See http://www.capstone-engine.org for further information. | ||
|
||
Copyright (c) 2013, COSEINC. | ||
All rights reserved. | ||
|
||
Redistribution and use in source and binary forms, with or without | ||
modification, are permitted provided that the following conditions are met: | ||
|
||
* Redistributions of source code must retain the above copyright notice, | ||
this list of conditions and the following disclaimer. | ||
* Redistributions in binary form must reproduce the above copyright notice, | ||
this list of conditions and the following disclaimer in the documentation | ||
and/or other materials provided with the distribution. | ||
* Neither the name of the developer(s) nor the names of its | ||
contributors may be used to endorse or promote products derived from this | ||
software without specific prior written permission. | ||
|
||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | ||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE | ||
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | ||
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | ||
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | ||
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | ||
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | ||
POSSIBILITY OF SUCH DAMAGE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,25 @@ | ||
Package: capstone | ||
Package: libcapstone-dev | ||
Source: capstone | ||
Version: <version-placeholder> | ||
Architecture: all | ||
Architecture: amd64 | ||
Maintainer: Rot127 <unisono@quyllur.org> | ||
Description: Capstone is a lightweight multi-platform, multi-architecture disassembly framework. | ||
Capstone supports the following frameworks; | ||
Alpha, BPF, Ethereum VM, HPPA, LoongArch, M68K, M680X, Mips, MOS65XX, PPC, RISC-V(rv32G/rv64G), | ||
SH, Sparc, SystemZ, TMS320C64X, TriCore, Webassembly, XCore and X86. | ||
Original-Maintainer: Debian Security Tools <team+pkg-security@tracker.debian.org> | ||
Installed-Size: <size-in-kb> | ||
Depends: libc6 (>= 2.2.5) | ||
Section: libdevel | ||
Priority: optional | ||
Multi-Arch: same | ||
Homepage: https://www.capstone-engine.org/ | ||
Description: lightweight multi-architecture disassembly framework - devel files | ||
Capstone is a lightweight multi-platform, multi-architecture disassembly | ||
framework. These are the development headers and libraries. | ||
Features: | ||
- Support hardware architectures: AArch64, ARM, Alpha, BPF, EVM, HPPA, LongArch, M680X, M68K, MOS65XX, Mips, PowerPC, RISCV, SH, Sparc, SystemZ, TMS320C64x, TriCore, WASM, x86, XCore, Xtensa. | ||
- Clean/simple/lightweight/intuitive architecture-neutral API. | ||
- Provide details on disassembled instructions (called "decomposer" by some | ||
others). | ||
- Provide some semantics of the disassembled instruction, such as list of | ||
implicit registers read & written. | ||
- Thread-safe by design. | ||
- Special support for embedding into firmware or OS kernel. | ||
- Distributed under the open source BSD license. |
Oops, something went wrong.