forked from capstone-engine/capstone
-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'next' of https://github.com/capstone-engine/capstone in…
…to v6
- Loading branch information
Showing
227 changed files
with
13,848 additions
and
3,071 deletions.
There are no files selected for viewing
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,58 @@ | ||
--- | ||
name: Bug report - Incorrect disassembly | ||
about: Create a report about incorrect disassembly. | ||
--- | ||
|
||
<!-- This template is meant for disassembly related bug reports, please be as descriptive as possible --> | ||
|
||
### Work environment | ||
|
||
<!-- Filling this table is mandatory --> | ||
|
||
| Questions | Answers | ||
|------------------------------------------|-------------------- | ||
| OS/arch/bits | Debian arm 64, MacOS AArch64, MacOS x86, Windows x86 etc. | ||
| Architecture | ppc, x86, cortexm, armv8 etc. | ||
| Source of Capstone | `git clone`, brew, pip, release binaries etc. | ||
| Version/git commit | v5.0.1, <commit hash> | ||
|
||
<!-- INCORRECT DISASSEMBLY BUGS --> | ||
|
||
### Instruction bytes giving faulty results | ||
|
||
``` | ||
0x00,0x00,0x00,0x00 | ||
``` | ||
|
||
### Expected results | ||
|
||
It should be: | ||
``` | ||
<this or that> | ||
``` | ||
|
||
### Steps to get the wrong result | ||
|
||
With `cstool`: | ||
|
||
```sh | ||
cstool arm -d 0x00,0x00,0x00,0x00 | ||
``` | ||
|
||
or with `Python` | ||
|
||
```python | ||
CODE = b'\x90\x90\x90\x90' | ||
|
||
md = Cs(CS_ARCH_ARM, CS_MODE_THUMB) | ||
md.detail = True | ||
for insn in md.disasm(CODE, 0x1000): | ||
# Print the faulty disassembly | ||
``` | ||
|
||
<!-- ADDITIONAL CONTEXT --> | ||
|
||
### Additional Logs, screenshots, source code, configuration dump, ... | ||
|
||
Drag and drop zip archives containing the Additional info here, don't use external services or link. | ||
Screenshots can be directly dropped here. |
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,40 @@ | ||
--- | ||
name: Bug report - Other bugs | ||
about: Create a report to help us improve | ||
|
||
--- | ||
|
||
<!-- This template is meant for GENERAL bug reports. | ||
For bugs regarding incorrect disassembly, | ||
please use the "Bug report - Incorrect disassembly" template. | ||
Please be as descriptive as possible | ||
--> | ||
|
||
### Work environment | ||
|
||
<!-- Filling this table is mandatory --> | ||
|
||
| Questions | Answers | ||
|------------------------------------------|-------------------- | ||
| OS/arch/bits | Debian arm 64, MacOS AArch64, MacOS x86, Windows x86 etc. | ||
| Architecture | ppc, x86, cortexm, armv8 etc. | ||
| Source of Capstone | `git clone`, brew, pip, release binaries etc. | ||
| Version/git commit | v5.0.1, <commit hash> | ||
|
||
<!-- OTHER BUGS --> | ||
|
||
### Expected behavior | ||
|
||
### Actual behavior | ||
|
||
### Steps to reproduce the behavior | ||
|
||
- Use code markdown `CODE` to make your code visible | ||
|
||
<!-- ADDITIONAL CONTEXT --> | ||
|
||
### Additional Logs, screenshots, source code, configuration dump, ... | ||
|
||
Drag and drop zip archives containing the Additional info here, don't use external services or link. | ||
Screenshots can be directly dropped here. |
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,19 @@ | ||
--- | ||
name: Feature request | ||
about: Suggest an idea for this project | ||
|
||
--- | ||
|
||
### Feature | ||
|
||
- [ ] New architecture module | ||
- [ ] Support for processor extension | ||
- [ ] Add more instruction details (elaborated below) | ||
- [ ] Binding support for: `language` | ||
- [ ] Other (elaborated below) | ||
|
||
**Describe the feature you'd like** | ||
A clear and concise description of what you want to happen. | ||
|
||
**Additional context** | ||
Add any other context about the feature request here. |
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,23 @@ | ||
<!-- Filling this template is mandatory --> | ||
|
||
**Your checklist for this pull request** | ||
- [ ] I've documented or updated the documentation of every API function and struct this PR changes. | ||
- [ ] I've added tests that prove my fix is effective or that my feature works (if possible) | ||
|
||
**Detailed description** | ||
|
||
<!-- Explain the **details** for making this change. Is a new feature implemented? What existing problem does the pull request solve? How does the pull request solve these issues? Please provide enough information so that others can review your pull request. --> | ||
|
||
... | ||
|
||
**Test plan** | ||
|
||
<!-- What steps should the reviewer take to test your pull request? Demonstrate the code is solid. Or what test cases you added. Disassembly tests should be added in suite/cs_test/issues.cs --> | ||
|
||
... | ||
|
||
**Closing issues** | ||
|
||
<!-- put "closes #XXXX" in your comment to auto-close the issue that your PR fixes (if any). --> | ||
|
||
... |
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,66 @@ | ||
name: Auto-Sync | ||
on: | ||
push: | ||
paths: | ||
- "suite/auto-sync/**" | ||
pull_request: | ||
|
||
jobs: | ||
check: | ||
runs-on: ubuntu-latest | ||
defaults: | ||
run: | ||
working-directory: suite/auto-sync/ | ||
steps: | ||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.11' | ||
|
||
- name: Check out repository | ||
uses: actions/checkout@v4 | ||
with: | ||
submodules: true | ||
|
||
- name: Install auto-sync package | ||
run: | | ||
pip install . | ||
- name: Check formatting | ||
run: | | ||
python3.11 -m black --check src/autosync | ||
- name: Build llvm-tblgen | ||
run: | | ||
git clone https://github.com/capstone-engine/llvm-capstone.git vendor/llvm_root | ||
cd vendor/llvm_root | ||
mkdir build | ||
cd build | ||
cmake -G Ninja -DCMAKE_BUILD_TYPE=Debug ../llvm | ||
cmake --build . --target llvm-tblgen --config Debug | ||
cd ../../../ | ||
- name: Test generation of inc files | ||
run: | | ||
./src/autosync/ASUpdater.py -d -a AArch64 -s IncGen | ||
./src/autosync/ASUpdater.py -d -a Alpha -s IncGen | ||
./src/autosync/ASUpdater.py -d -a ARM -s IncGen | ||
./src/autosync/ASUpdater.py -d -a PPC -s IncGen | ||
- name: CppTranslator - Patch tests | ||
run: | | ||
python -m unittest src/autosync/cpptranslator/Tests/test_patches.py | ||
- name: CppTranslator - Differ tests | ||
run: | | ||
python -m unittest src/autosync/cpptranslator/Tests/test_differ.py | ||
- name: CppTranslator - Test translation | ||
run: | | ||
./src/autosync/ASUpdater.py --ci -d -a AArch64 -s Translate | ||
./src/autosync/ASUpdater.py --ci -d -a ARM -s Translate | ||
./src/autosync/ASUpdater.py --ci -d -a PPC -s Translate | ||
- name: Test Header patcher | ||
run: | | ||
python -m unittest src/autosync/Tests/test_header_patcher.py |
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,20 @@ | ||
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ | ||
Upstream-Name: CapstoneEngine | ||
Source: https://github.com/capstone-engine/capstone | ||
|
||
Files: src/autosync/cpptranslator/Tests/test_config.json | ||
Copyright: 2022 Rot127 <[email protected]> | ||
License: BSD-3 | ||
|
||
Files: src/autosync/cpptranslator/arch_config.json | ||
Copyright: 2022 Rot127 <[email protected]> | ||
License: BSD-3 | ||
|
||
Files: src/autosync/cpptranslator/saved_patches.json | ||
Copyright: 2022 Rot127 <[email protected]> | ||
License: BSD-3 | ||
|
||
Files: src/autosync/path_vars.json | ||
Copyright: 2022 Rot127 <[email protected]> | ||
License: BSD-3 | ||
|
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,9 @@ | ||
{% for copyright_line in copyright_lines %} | ||
{{ copyright_line }} | ||
{% endfor %} | ||
{% for contributor_line in contributor_lines %} | ||
SPDX-FileContributor: {{ contributor_line }} | ||
{% endfor %} | ||
{% for expression in spdx_expressions %} | ||
SPDX-License-Identifier: {{ expression }} | ||
{% endfor %} |
Oops, something went wrong.