Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Breaking Change: Don't add capstone dir to include search path #2178

Closed
wants to merge 2,315 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
2315 commits
Select commit Hold shift + click to select a range
abf1b46
Optimize TriCore instruction information.
imbillow Apr 6, 2023
e579032
Optimize TriCore instruction information.
imbillow Apr 6, 2023
bdc4aa4
refactor: Improve TriCore instruction definitions in architecture file
imbillow Apr 6, 2023
d3163a6
refactor: Improve instruction handling for TriCore architecture
imbillow Apr 6, 2023
4409b29
Add support for TriCore V162 and new instructions/operands.
imbillow Apr 6, 2023
4b3f284
Refactor: Optimize TriCore instruction information.
imbillow Apr 6, 2023
443af68
refactor: Improve TriCore floating-point operations in instruction set
imbillow Apr 7, 2023
d59e012
refactor: Optimize TriCore instructions in arch/TriCore/TriCoreInstrI…
imbillow Apr 7, 2023
b9151fb
fix
imbillow Apr 7, 2023
7c56b54
feat: Add support for TriCore feature bits and new architectures
imbillow Apr 7, 2023
98c1a24
feat: Refactor and improve triCore platform support
imbillow Apr 7, 2023
7200d39
feat: Update TriCore processor support and architecture modes
imbillow Apr 7, 2023
463a8df
fix
imbillow Apr 7, 2023
587279f
add some tc162 tests
imbillow Apr 7, 2023
c1c4137
fix TriCoreDisassembler.c from tests
imbillow Apr 8, 2023
bd8b7da
fix tricore tests
imbillow Apr 8, 2023
b4820f2
feat: Update Tricore assembly code and disassembler logic.
imbillow Apr 8, 2023
73810e1
add tc110 tests and fix tricore decode
imbillow Apr 8, 2023
3b11b2d
fix `CADD` `CSUB`
imbillow Apr 8, 2023
9939c86
fix tc110 test and fix decode
imbillow Apr 8, 2023
8dd3ae1
fix `RCR` printer
imbillow Apr 8, 2023
95ffda7
fix
imbillow Apr 8, 2023
ff0c69f
fix
imbillow Apr 8, 2023
f0cfb4d
fix
imbillow Apr 8, 2023
42ce4f2
fix tc1.1 tests
imbillow Apr 8, 2023
a93ace5
fix tc1.6.2 tests
imbillow Apr 8, 2023
9c982d3
fix tc1.6.2 tests
imbillow Apr 8, 2023
4d9d539
add tests
imbillow Apr 8, 2023
9bf0041
Update TriCore instructions in TriCoreInstrInfo.td
imbillow Apr 8, 2023
5417985
fix tests
imbillow Apr 9, 2023
6b334f8
fix tests
imbillow Apr 9, 2023
2814baa
fix tests
imbillow Apr 9, 2023
5af4475
fix `TRICORE_GENERIC` inst
imbillow Apr 9, 2023
2de47c4
fix tests
imbillow Apr 9, 2023
f8ad73b
fix `TriCore_getRegisterName`
imbillow Apr 9, 2023
cb8e351
cleanup
imbillow Apr 9, 2023
80ce512
fix `TRICORE_OP_MEM`
imbillow Apr 9, 2023
a7581ac
fix `TriCoreGenCSMappingInsnName.inc`
imbillow Apr 10, 2023
5260fbe
Update tricore `.inc`
imbillow Apr 10, 2023
4033ff0
fix `test_corpus.py`
imbillow Apr 10, 2023
926714c
fix fuzz
imbillow Apr 10, 2023
37647a2
fix fuzz
imbillow Apr 10, 2023
4ebad28
update TriCoreGenAsmWriter.inc
imbillow Apr 13, 2023
878883a
add TriCore in README
imbillow Apr 14, 2023
d9f13fe
fix tricore endian
imbillow Apr 17, 2023
f3a3018
Add handling of prefix `NOTRACK`
junghee Apr 19, 2023
9c5449f
Merge pull request #1 from junghee/junghee/notrack
junghee Apr 19, 2023
37bc4e8
fix: support for TriCore call group mapping
imbillow Apr 20, 2023
d88124b
fix all tricore compile warnings
imbillow Apr 20, 2023
331103b
fix: compile error missing file cstool msvc/visual studio
raigorx Apr 20, 2023
3e80060
Merge pull request #2000 from raigorx/patch-1
kabeor Apr 20, 2023
58bce36
Format all .(c|h) code
imbillow Apr 20, 2023
9c468ea
Merge pull request #2002 from junghee/next
kabeor Apr 22, 2023
18f82fc
Fix format error
imbillow Apr 23, 2023
4bc115f
Fix `print_insn_detail_tricore` and disp fill
imbillow Apr 23, 2023
9e15c96
Fix tricore python binding
imbillow Apr 24, 2023
010acad
Fix HACK.TXT
imbillow Apr 24, 2023
1ed507b
Fix tricore.h and remove `inc` folder
imbillow Apr 25, 2023
9f68cf9
Fix make builds with SH support
radare Apr 25, 2023
4d693da
Fix tricore.h
imbillow Apr 26, 2023
68e2707
Merge pull request #2006 from trufae/make-sh
kabeor Apr 27, 2023
620f0d0
Merge branch 'next' into tricore
imbillow Apr 27, 2023
985b6fc
Upper all `inc` and fix
imbillow May 1, 2023
588a3e1
Upper tricore_const.py
imbillow May 1, 2023
a1c3b63
Update suite/test_corpus3.py
imbillow May 1, 2023
0b1e82a
RISCV: add more instruction groups
peace-maker May 1, 2023
d1cd5ae
Add missing architectures in the readme and sort them (#2008)
trufae May 2, 2023
a658d37
Merge branch 'next' into tricore
imbillow May 2, 2023
98f1155
Merge pull request #1973 from imbillow/tricore
kabeor May 3, 2023
3aff954
Update README.md
aquynh May 3, 2023
5e2edea
Fix compilation warnings related to TriCore. (#2012)
imbillow May 9, 2023
747c9b6
Fix SH build warnings.
Rot127 May 11, 2023
806047f
Update indentation
Rot127 May 11, 2023
7d1ebc1
Merge pull request #2016 from Rot127/fix_sh_warnings
kabeor May 12, 2023
460d119
Fix tricore disp24 print
imbillow May 12, 2023
08a816b
Fix warnings about unhandled switch cases by adding defaults.
Rot127 May 12, 2023
b02d471
Fix tricore disp print
imbillow May 12, 2023
8e2d2d5
Refactor TriCoreInstPrinter.c
imbillow May 12, 2023
932bd3b
Update arch/TriCore/TriCoreInstPrinter.c
imbillow May 12, 2023
52f39ef
Update arch/TriCore/TriCoreInstPrinter.c
imbillow May 12, 2023
9961410
Update arch/TriCore/TriCoreInstPrinter.c
imbillow May 12, 2023
3e06196
Merge pull request #2018 from imbillow/tricore-fix-disp
kabeor May 13, 2023
8738f01
Initialize rw
Rot127 May 13, 2023
20bdadb
Fix ctest build
imbillow May 13, 2023
681dd11
Fix disp fill
imbillow May 13, 2023
7a3dc32
Merge pull request #2017 from Rot127/fix_sh_warnings
kabeor May 16, 2023
798f814
Merge pull request #2019 from imbillow/tricore-fix-disp
kabeor May 16, 2023
07e5ee8
Fix register accesses & operands of multiple PAC instructions
stevielavern May 16, 2023
9d2922b
Fix disassemble of `xor`
imbillow May 17, 2023
605e116
Merge pull request #2023 from imbillow/tricore_fix
kabeor May 18, 2023
42c0157
Add missing arm64 to Darwin LIBARCHS and remove dependencies tracking…
gdbinit May 19, 2023
f923221
Fix if indent
gdbinit May 19, 2023
790065a
Merge pull request #2022 from stevielavern/fix_pac
kabeor May 20, 2023
3d92995
Merge pull request #2024 from gdbinit/fat_fix
kabeor May 20, 2023
586a7d1
Fix compile warning
imbillow May 20, 2023
dc69f00
Merge pull request #2027 from imbillow/tc-fix
kabeor May 20, 2023
d3fc2da
Set mnemonic in PPC_printInst().
Rot127 May 21, 2023
80ede42
Merge pull request #2028 from Rot127/set_cr0_fix
kabeor May 22, 2023
6b50d1d
Replace strncpy with memcpy because we copy from larger to smaller bu…
Rot127 May 27, 2023
7674d88
Merge pull request #2033 from Rot127/set_cr0_fix
kabeor May 28, 2023
b0e7417
Pull auto-sync's changes from https://github.com/capstone-engine/caps…
Rot127 May 30, 2023
f40f097
Fix compile warnings under `CMake -Wall`
imbillow May 28, 2023
9d6c489
Add `.clang-format` and format
imbillow May 30, 2023
6c3a899
Add operands access support for TriCore
imbillow May 30, 2023
7729902
Merge pull request #2034 from imbillow/tc-reg-rw
kabeor May 30, 2023
ad632d1
Add ctest regression tests
peace-maker May 30, 2023
654512f
Merge branch 'next' into riscv_insn_groups
peace-maker May 30, 2023
1c0c185
Hotfix for -DCAPSTONE_DIET build.
Rot127 May 30, 2023
a026fc4
Merge pull request #2038 from Rot127/fix_diet_build
kabeor May 31, 2023
d17307e
Fix Python Bindings after changes to cs_detail
peace-maker Jun 5, 2023
dc7d2be
Fix TriCore Python bindings
peace-maker Jun 5, 2023
1da1cbf
Fix RISCV Python bindings
peace-maker Jun 5, 2023
ec48262
Merge pull request #2041 from peace-maker/fix_python_bindings
kabeor Jun 9, 2023
e9fd6f4
Merge pull request #2007 from peace-maker/riscv_insn_groups
kabeor Jun 10, 2023
ac1d85e
capstone.pc.in: re-add capstone include subdirectory via Cflags.
orlitzky Jun 16, 2023
2042a81
capstone.pc.in: use https in the URL.
orlitzky Jun 16, 2023
140b85b
Merge pull request #2046 from orlitzky/pkgconfig-includes
kabeor Jun 16, 2023
5c3171a
update ChangeLog to 5.0.0-rc3
kabeor Jun 17, 2023
ea62eda
Merge branch 'next' of https://github.com/kabeor/capstone into next
kabeor Jun 17, 2023
045171f
Merge pull request #2047 from kabeor/next
kabeor Jun 17, 2023
ba4df3a
Fix TriCore test
hamarituc Jun 17, 2023
f05e4f6
Merge pull request #2049 from hamarituc/tricore-test
kabeor Jun 18, 2023
d6bd312
[workflows] update python-publish
kabeor Jun 18, 2023
434ce5e
Merge branch 'capstone-engine:next' into next
kabeor Jun 18, 2023
c0e5649
[workflows] update python-publish
kabeor Jun 18, 2023
63f70a9
Merge branch 'next' of https://github.com/kabeor/capstone into next
kabeor Jun 18, 2023
ef44d9e
[bindings] fix twine issue when publish
kabeor Jun 18, 2023
5eb935d
[bindings] fix twine issue when publish
kabeor Jun 18, 2023
052c904
[workflows] update actions version
kabeor Jun 18, 2023
3892be2
[workflows] remove manual publish
kabeor Jun 18, 2023
8784a6e
[bindings] Adapt python2 for setup.py
kabeor Jun 18, 2023
58e7ec8
Merge pull request #2050 from kabeor/next
kabeor Jun 18, 2023
acfd58a
Update version tag
kabeor Jun 18, 2023
2bc6610
Merge branch 'capstone-engine:next' into next
kabeor Jun 18, 2023
f5e3ecd
Merge pull request #2052 from kabeor/next
kabeor Jun 18, 2023
f66d2cb
bindings: update binding consts
aquynh Jun 18, 2023
d0ef8ab
README: use https
aquynh Jun 18, 2023
e445f4f
[workflows] Remove deprecated image versions
kabeor Jun 23, 2023
1c5f398
[workflows] Adjust matrix version
kabeor Jun 23, 2023
b9e76dd
Fix capstone_test.c
imbillow Jun 23, 2023
49adaac
Fix const_generator.py and tricore_const.py
imbillow Jun 23, 2023
ef4fff6
Merge pull request #2057 from kabeor/next
kabeor Jun 23, 2023
30bfce3
fix msvc static lib build error
arkup Jun 23, 2023
5be5aa7
fix compile error capstone_dll unresolved external symbol _insn_find
arkup Jun 23, 2023
b39fac7
Fix tricore.h
imbillow Jun 23, 2023
14ea1ae
Update all *_const.py
imbillow Jun 23, 2023
1b1812c
fix static lib to compile with has_tricore
arkup Jun 24, 2023
69e524e
fix msvc dll to compile with has_tricore, plus added CRT_SECURE_NO_WA…
arkup Jun 24, 2023
d971234
Merge pull request #2060 from imbillow/fix-capstone-test
kabeor Jun 24, 2023
34aa92d
Support repz prefix on X86 ret instructions
adamjseitz Jun 24, 2023
24ef1bd
Merge pull request #2063 from adamjseitz/repz-ret
kabeor Jun 25, 2023
9a4cd0d
Merge pull request #2061 from arkup/next
kabeor Jun 25, 2023
3341c1a
use calloc for cs_insn instead of malloc (#1972)
ConnorRigby Jun 26, 2023
0f305ce
Fix access bug for TEST op (#1511)
melynx Jun 26, 2023
752c47b
Update ChangeLog to Version 5.0.0
kabeor Jun 27, 2023
03528d1
Convert Tricore to Intel register syntax
XVilka Jun 28, 2023
eecf95b
Convert Tricore tests to Intel register syntax
XVilka Jun 28, 2023
47f3692
Normalize rc4 version string
peace-maker Jun 28, 2023
19a6093
Search for correct versioned lib .5 suffix
peace-maker Jun 28, 2023
38e03cd
Add CS_GRP_BRANCH_RELATIVE to python bindings
peace-maker Jun 28, 2023
c9964b0
Update Cython bindings
peace-maker Jun 28, 2023
3ba8e54
Merge pull request #2068 from peace-maker/cython_bindings
kabeor Jun 29, 2023
f8f50f0
Merge pull request #2067 from XVilka/tricore-intel-syntax
kabeor Jun 30, 2023
e4d333b
Add `#` prefix to tricore imm operand
imbillow Jul 1, 2023
88c23bc
Update tests and inc files
imbillow Jul 1, 2023
5621567
Merge pull request #2070 from imbillow/tricore-fix
kabeor Jul 1, 2023
1995ddf
Revert "Mark cs_* as thread local to avoid race condition in multithr…
oleavr Jul 1, 2023
53e6814
Update ChangeLog to Version 5.0.0
kabeor Jul 3, 2023
35bc3c0
bindings: update Java consts for Arm64
aquynh Jul 5, 2023
437cd1d
ChangeLog
aquynh Jul 5, 2023
a4effe8
update pkgconfig.mk for 5.0
aquynh Jul 5, 2023
17a1ecb
Remove outdated and irrelevant TODO
XVilka Jul 5, 2023
fe43f08
Replace strncpy with memcpy to fix compiler warning.
Rot127 Jul 5, 2023
abbb723
Merge pull request #2075 from Rot127/sparc-strncpy
kabeor Jul 5, 2023
7fa8eb0
Merge pull request #2074 from XVilka/remove-todo
kabeor Jul 5, 2023
650e85d
Update ChangeLog v5.0 Final
kabeor Jul 5, 2023
f2ffa75
5.0-post1
aquynh Jul 5, 2023
8ae8f68
python: update binding README
aquynh Jul 5, 2023
a7a9a86
[SuperH]: fix IMM format specifier in test (#2080)
XVilka Jul 18, 2023
674abbe
Architecture updater (auto-sync) - Updating ARM (#1949)
Rot127 Jul 19, 2023
7572681
Run clang-format (#2093)
Rot127 Jul 19, 2023
20fe403
Add Python bindings for WASM
peace-maker Jul 13, 2023
0ce2171
Update CS_* constants in Python bindings
peace-maker Jul 13, 2023
2ed0906
Update constants from ARM auto-sync patch
peace-maker Jul 19, 2023
e897c6c
Bumb manylinux version to 2014 (x86) and 2_28 (x86_64) repectivly.
Rot127 Jul 19, 2023
57de96f
Merge pull request #2092 from Rot127/fix-build
kabeor Jul 20, 2023
05124d7
ci: use proper job syntax for Windows
XVilka Jul 20, 2023
2bd076d
Merge pull request #2098 from XVilka/fix-windows-python-ci
kabeor Jul 20, 2023
964dd20
Update Python bindings for x86
peace-maker Jul 13, 2023
9df1aa8
Update Python bindings for m68k
peace-maker Jul 13, 2023
fbf991c
Update Python bindings for mos65xx
peace-maker Jul 13, 2023
2008eac
fix #2101
Rot127 Jul 21, 2023
08df8b1
Merge pull request #2103 from Rot127/fix-header-include
kabeor Jul 21, 2023
4789242
ci: use cibuildwheel for python wheels (#2099)
XVilka Jul 21, 2023
a66c2af
Merge pull request #2095 from peace-maker/python_wasm
kabeor Jul 21, 2023
c8984e6
Merge pull request #2097 from peace-maker/update_python_constants
kabeor Jul 21, 2023
d8409ff
Merge pull request #2100 from peace-maker/sync_bindings
kabeor Jul 21, 2023
4a6edac
Add check for present detail.
Rot127 Jul 21, 2023
da298bd
Use OS independent printf formatting.
Rot127 Jul 22, 2023
9c3220a
Add pop alias instruction for t2LDR_POST
Rot127 Jul 22, 2023
2a043ef
Merge pull request #2110 from Rot127/inter-os-printf-formatting-next
kabeor Jul 22, 2023
df5e091
Set sysop members by their C++ type name.
Rot127 Jul 22, 2023
7f6b061
Remove leftover code.
Rot127 Jul 22, 2023
039ade4
Merge pull request #2111 from Rot127/arm-pop-alias
kabeor Jul 22, 2023
cdc796a
Merge pull request #2112 from Rot127/arm-enum-conversion
kabeor Jul 22, 2023
0c73f7a
Merge pull request #2107 from Rot127/fix-arm
kabeor Jul 22, 2023
c7b659a
Return firs the system register name.
Rot127 Jul 22, 2023
6523231
Add more in LLVM hard coded operands.
Rot127 Jul 22, 2023
24e1ec8
Add CPSR to implicit reads for every instruction which has a predicate.
Rot127 Jul 22, 2023
9153bb3
Formatting
Rot127 Jul 22, 2023
40e5c08
Add forgotten check
Rot127 Jul 22, 2023
6bc8f0f
Merge pull request #2116 from Rot127/sysreg-names
kabeor Jul 23, 2023
ebfb78d
Merge pull request #2119 from Rot127/arm-hard-coded-operands
kabeor Jul 23, 2023
09fea43
Merge pull request #2121 from Rot127/arm-implicit-reads
kabeor Jul 23, 2023
9b7935b
[ARM] Remove LDM leftover code (#2115)
Rot127 Jul 23, 2023
897e1f2
Add Werror to compile options. (#2114)
Rot127 Jul 23, 2023
6a8a0ec
Increment next branch version.
Rot127 Jul 23, 2023
6a21169
Merge pull request #2123 from Rot127/next-branch-v6
kabeor Jul 23, 2023
169c9a1
Add Python bindings for SH
peace-maker Jul 13, 2023
1bbb610
Handle system operands in way more detail.
Rot127 Jul 23, 2023
52be604
Fix off by one error. Because detail would have one operand more.
Rot127 Jul 23, 2023
a71b8cc
Set correct registers.
Rot127 Jul 23, 2023
4a44b9c
Set correct SYSm value for BankedRegister
Rot127 Jul 24, 2023
8e4d993
Merge pull request #2122 from Rot127/arm-sysreg-mask
kabeor Jul 24, 2023
10a4d8d
Merge pull request #2096 from peace-maker/python_sh
kabeor Jul 24, 2023
9099567
Fixing TriCore disasm instructions (#2088)
bkoppelmann Jul 26, 2023
a4df92e
Fix ARM Python bindings (#2127)
peace-maker Jul 29, 2023
5f76641
Fix running `cstest` in CI (#2126)
peace-maker Aug 6, 2023
2c3af48
Add support for Python binding for diasm_iter (#2136)
fzakaria Aug 9, 2023
36c5eef
allow absolute CMAKE_INSTALL_*DIR (#2134)
chayleaf Aug 9, 2023
8d64293
Disable swift binding const generate (#2142)
kabeor Aug 21, 2023
0e160ac
Set correct values for the MCRegisterInfo struct. (#2146)
Rot127 Aug 28, 2023
f036d2d
fix compile errors in capstone_static - unresolved external symbols (…
tkoecker Aug 30, 2023
5261e84
Architecture updater (auto-sync) - Updating PPC (#2013)
Rot127 Sep 5, 2023
a002bb4
Add default case to matchAliasCondition() (#2156)
Rot127 Sep 8, 2023
a7c9d2e
[ARM] Vector data types (#2151)
Rot127 Sep 8, 2023
0daa504
Make capstone/ppc.h compatible with C++ (#2155)
ncbray Sep 8, 2023
1fc54a3
Run clang-format on PPC (#2157)
Rot127 Sep 9, 2023
4dd3358
Init DecodeComplete to false to fix unintialized usage. (#2158)
Rot127 Sep 9, 2023
080314d
Fix misspelling in COMPILE_CMAKE.TXT
kabeor Sep 11, 2023
8f0d5ed
[Fix] no return value error in Apple Silicon (#2160)
kabeor Sep 11, 2023
9334b33
Test Python bindings in CI (#2161)
peace-maker Sep 15, 2023
320435d
Init DecodeComplete with false for all archs. (#2164)
Rot127 Sep 15, 2023
103ace5
Add memory properties to iPTR operands. (#2165)
Rot127 Sep 17, 2023
4fb1f45
Fix misleading-indet warning. (#2167)
Rot127 Sep 22, 2023
0155912
Handle reserved values of the 'at' bits of BO fields. (#2168)
Rot127 Sep 22, 2023
a088a5e
Add regression tests for QPX (#2169)
Rot127 Sep 24, 2023
1fc1011
Fix warning about negative shifts. (#2171)
Rot127 Sep 24, 2023
5fb8a42
support pkg-config --static flag in capstone.pc (#2173)
michaeldleslie Oct 6, 2023
88b9291
Breaking Change: Don't add capstone dir to include search path
autoantwort Oct 20, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
14 changes: 14 additions & 0 deletions .appveyor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
version: 4.0-{build}

os:
- Visual Studio 2015

before_build:
- call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" amd64

build_script:
- mkdir build
- cd build
- cmake -DCMAKE_BUILD_TYPE=RELEASE -G "NMake Makefiles" ..
- nmake

120 changes: 120 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
# SPDX-License-Identifier: GPL-2.0
#
# clang-format configuration file. Intended for clang-format >= 11.
#
# For more information, see:
#
# Documentation/process/clang-format.rst
# https://clang.llvm.org/docs/ClangFormat.html
# https://clang.llvm.org/docs/ClangFormatStyleOptions.html
#
---
AccessModifierOffset: -4
AlignAfterOpenBracket: Align
AlignConsecutiveAssignments: false
AlignConsecutiveDeclarations: false
AlignEscapedNewlines: DontAlign
AlignOperands: true
AlignTrailingComments:
Kind: Always
OverEmptyLines: 2
AllowAllParametersOfDeclarationOnNextLine: false
AllowShortBlocksOnASingleLine: false
AllowShortCaseLabelsOnASingleLine: false
AllowShortFunctionsOnASingleLine: None
AllowShortIfStatementsOnASingleLine: false
AllowShortLoopsOnASingleLine: false
AlwaysBreakAfterDefinitionReturnType: None
AlwaysBreakAfterReturnType: None
AlwaysBreakBeforeMultilineStrings: false
AlwaysBreakTemplateDeclarations: false
BinPackArguments: true
BinPackParameters: true
BraceWrapping:
AfterClass: false
AfterControlStatement: false
AfterEnum: false
AfterFunction: true
AfterNamespace: true
AfterObjCDeclaration: false
AfterStruct: false
AfterUnion: false
AfterExternBlock: false
BeforeCatch: false
BeforeElse: false
IndentBraces: false
SplitEmptyFunction: true
SplitEmptyRecord: true
SplitEmptyNamespace: true
BreakBeforeBinaryOperators: None
BreakBeforeBraces: Custom
BreakBeforeInheritanceComma: false
BreakBeforeTernaryOperators: false
BreakConstructorInitializersBeforeComma: false
BreakConstructorInitializers: BeforeComma
BreakAfterJavaFieldAnnotations: false
BreakStringLiterals: false
ColumnLimit: 80
CommentPragmas: '^ IWYU pragma:'
CompactNamespaces: false
ConstructorInitializerAllOnOneLineOrOnePerLine: false
ConstructorInitializerIndentWidth: 8
ContinuationIndentWidth: 8
Cpp11BracedListStyle: false
DerivePointerAlignment: false
DisableFormat: false
ExperimentalAutoDetectBinPacking: false
FixNamespaceComments: false

IncludeBlocks: Preserve
IncludeCategories:
- Regex: '.*'
Priority: 1
IncludeIsMainRegex: '(Test)?$'
IndentCaseLabels: false
IndentGotoLabels: false
IndentPPDirectives: None
IndentWidth: 8
IndentWrappedFunctionNames: false
JavaScriptQuotes: Leave
JavaScriptWrapImports: true
KeepEmptyLinesAtTheStartOfBlocks: false
MacroBlockBegin: ''
MacroBlockEnd: ''
MaxEmptyLinesToKeep: 1
NamespaceIndentation: None
ObjCBinPackProtocolList: Auto
ObjCBlockIndentWidth: 8
ObjCSpaceAfterProperty: true
ObjCSpaceBeforeProtocolList: true

# Taken from git's rules
PenaltyBreakAssignment: 10
PenaltyBreakBeforeFirstCallParameter: 30
PenaltyBreakComment: 10
PenaltyBreakFirstLessLess: 0
PenaltyBreakString: 10
PenaltyExcessCharacter: 100
PenaltyReturnTypeOnItsOwnLine: 60

PointerAlignment: Right
ReflowComments: false
SortIncludes: false
SortUsingDeclarations: false
SpaceAfterCStyleCast: false
SpaceAfterTemplateKeyword: true
SpaceBeforeAssignmentOperators: true
SpaceBeforeCtorInitializerColon: true
SpaceBeforeInheritanceColon: true
SpaceBeforeParens: ControlStatementsExceptForEachMacros
SpaceBeforeRangeBasedForLoopColon: true
SpaceInEmptyParentheses: false
SpacesBeforeTrailingComments: 1
SpacesInAngles: false
SpacesInContainerLiterals: false
SpacesInCStyleCastParentheses: false
SpacesInParentheses: false
SpacesInSquareBrackets: false
Standard: Cpp03
TabWidth: 8
UseTab: Always
22 changes: 22 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
root = true

[*]
end_of_line = lf
insert_final_newline = true

[*.{py,pyx,pxd}]
indent_style = space
indent_size = 4

# Follow Linux kernel coding style
[*.{c,h,cpp,hpp,inc}]
indent_style = tab
indent_size = 8

# OCaml bindings
[*.ml]
indent_style = tab
indent_size = 4

[Makefile]
indent_style = tab
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/arch/**/*.inc linguist-language=C
178 changes: 178 additions & 0 deletions .github/workflows/CITest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,178 @@
name: Run Test
on:
push:
paths-ignore:
- ".gitignore"
- "docs/**"
- "ChangeLog"
- "CREDITS.TXT"
- "COMPILE.TXT"
- "COMPILE_MSVC.TXT"
- "COMPILE_CMAKE.TXT"
- "HACK.TXT"
- "LICENSE.TXT"
- "LICENSE_LLVM.TXT"
- "README.md"
- "RELEASE_NOTES"
- "SPONSORS.TXT"
- "TODO"
pull_request:

env:
CI: true

jobs:
Linux:
runs-on: ${{ matrix.config.os }}
name: ${{ matrix.config.name }}
strategy:
fail-fast: false
matrix:
config:
- {
name: 'ubuntu-20.04 x64 python3.6 cmake',
os: ubuntu-20.04,
arch: x64,
python-arch: x64,
python-version: '3.6',
build-system: 'cmake',
}
- {
name: 'ubuntu-22.04 x64 python3.9 make',
os: ubuntu-22.04,
arch: x64,
python-arch: x64,
python-version: '3.9',
build-system: 'make',
}
- {
name: 'ubuntu-22.04 x64 python3.9 cmake',
os: ubuntu-22.04,
arch: x64,
python-arch: x64,
python-version: '3.9',
build-system: 'cmake',
}
- {
name: 'ubuntu-22.04 x64 python3.11 cmake',
os: ubuntu-22.04,
arch: x64,
python-arch: x64,
python-version: '3.11',
build-system: 'cmake',
}

steps:
- uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.config.python-version }}

- name: prepare
run: |
export LD_LIBRARY_PATH=`pwd`/tests/:$LD_LIBRARY_PATH
wget https://github.com/groundx/capstonefuzz/raw/master/corpus/corpus-libFuzzer-capstone_fuzz_disasmnext-latest.zip
unzip -q corpus-libFuzzer-capstone_fuzz_disasmnext-latest.zip -d suite/fuzz
git clone https://git.cryptomilk.org/projects/cmocka.git suite/cstest/cmocka
chmod +x suite/cstest/build_cstest.sh

- name: make
if: startsWith(matrix.config.build-system, 'make')
run: |
./make.sh
make check
sudo make install
cp libcapstone.so.5 libcapstone.so.5.0

- name: cmake
if: startsWith(matrix.config.build-system, 'cmake')
run: |
mkdir build && cd build
# build static library
cmake -DCAPSTONE_INSTALL=1 -DCMAKE_INSTALL_PREFIX=/usr ..
cmake --build . --config Release
# build shared library
cmake -DCAPSTONE_INSTALL=1 -DBUILD_SHARED_LIBS=1 -DCMAKE_INSTALL_PREFIX=/usr ..
sudo cmake --build . --config Release --target install
cp libcapstone.* ../
cp libcapstone.* ../tests/
cp test_* ../tests/

- name: cstest
run: |
cd suite/cstest && ./build_cstest.sh
python cstest_report.py -D -t build/cstest -d ../MC
python cstest_report.py -D -t build/cstest -f issues.cs; cd ..

- name: verify python binding
run: |
mkdir -p bindings/python/capstone/lib && cp libcapstone.so.5.* bindings/python/capstone/lib/libcapstone.so
cd bindings/python

# check if the generated *_const.py files are up-to-date
mkdir capstone_old && cp capstone/*_const.py capstone_old/
make gen_const
for f in ./capstone/*_const.py; do
diff -u -w "$f" "./capstone_old/`basename $f`"
if [ ! $? -eq 0 ]; then
exit 1
fi
done
rm -rf capstone_old

# smoke test api usage
make check

- name: run python binding test
run: |
cp libcapstone.* bindings/python/prebuilt
cd bindings/python
make install3
cd ..
BUILD_TESTS=no make tests

- name: run cython binding test
run: |
pip install cython
cd bindings/python
make install3_cython
cd ..
python -c "import capstone;print(capstone.debug())" | grep Cython
BUILD_TESTS=no make tests

Windows:
runs-on: ${{ matrix.config.os }}
name: ${{ matrix.config.name }}
strategy:
fail-fast: false
matrix:
config:
- name: 'windows x64 MSVC 64bit'
os: windows-latest
arch: x64
platform: windows
python-arch: x64
python-version: '3.9'

steps:
- uses: actions/checkout@v3

- uses: lukka/get-cmake@latest
name: Get CMake

- name: '🛠️ Win MSVC 64 setup'
if: contains(matrix.config.name, 'MSVC 64')
uses: ilammy/msvc-dev-cmd@v1
with:
arch: 'x64'

- name: '🚧 Win MSVC 64 build'
if: contains(matrix.config.name, 'MSVC 64')
shell: bash
run: |
cmake --version
cmake --preset=${{ matrix.config.platform }}-x64
cmake --build --preset build-${{ matrix.config.platform }}-release
cmake --build --preset install-${{ matrix.config.platform }}-release
50 changes: 50 additions & 0 deletions .github/workflows/build_release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Build Source Release

# Trigger whenever a release is created
on:
release:
types:
- created

jobs:
build:
name: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: true

- name: archive
id: archive
run: |
VERSION=${{ github.event.release.tag_name }}
PKGNAME="capstone-$VERSION"
SHASUM=$PKGNAME.tar.xz.sha256
mkdir -p /tmp/$PKGNAME
mv * /tmp/$PKGNAME
mv /tmp/$PKGNAME .
TARBALL=$PKGNAME.tar.xz
tar cJf $TARBALL $PKGNAME
sha256sum $TARBALL > $SHASUM
echo "::set-output name=tarball::$TARBALL"
echo "::set-output name=shasum::$SHASUM"
- name: upload tarball
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./${{ steps.archive.outputs.tarball }}
asset_name: ${{ steps.archive.outputs.tarball }}
asset_content_type: application/gzip

- name: upload shasum
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./${{ steps.archive.outputs.shasum }}
asset_name: ${{ steps.archive.outputs.shasum }}
asset_content_type: text/plain
Loading