Skip to content

Commit 27dbc6a

Browse files
patryk4815claude
andcommitted
Bump capstone to v6.0.0-Alpha7
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 95218bc commit 27dbc6a

3 files changed

Lines changed: 88 additions & 3 deletions

File tree

CLAUDE.md

Lines changed: 30 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
44

55
## Overview
66

7-
This repo packages Capstone 6.0.0-Alpha6 as a Python package named `capstone6pwndbg` (renamed from the upstream `capstone` to avoid conflicts), intended for use by the [pwndbg](https://github.com/pwndbg/pwndbg) debugger.
7+
This repo packages Capstone 6.0.0-Alpha7 as a Python package named `capstone6pwndbg` (renamed from the upstream `capstone` to avoid conflicts), intended for use by the [pwndbg](https://github.com/pwndbg/pwndbg) debugger.
88

99
The actual Capstone source lives in the `capstone/` git submodule — do not modify it directly. The only root-level files that matter here are:
1010
- `python-rename.patch` — renames the Python package from `capstone` to `capstone6pwndbg` in the submodule's `setup.py`
@@ -29,4 +29,32 @@ This repo has no source code of its own. Its only purpose is:
2929
2. Apply `python-rename.patch` to rename the published package.
3030
3. Drive CI to build and publish wheels to PyPI.
3131

32-
When updating the pinned Capstone version: update the submodule ref, verify the patch still applies cleanly, then push a new `v*` tag to trigger the release workflow.
32+
## Bumping the Capstone version
33+
34+
1. Fetch new tags in the submodule and check out the new tag:
35+
```bash
36+
cd capstone
37+
git fetch --tags
38+
git checkout <new-tag> # e.g. 6.0.0-Alpha8
39+
cd ..
40+
```
41+
42+
2. Verify the patch still applies cleanly:
43+
```bash
44+
git apply --check python-rename.patch
45+
```
46+
If it fails, update `python-rename.patch` accordingly (regenerate the affected hunks with `git diff`).
47+
48+
3. Stage and commit the changes in the root repo:
49+
```bash
50+
git add capstone python-rename.patch
51+
git commit -m "Bump capstone to <new-tag>"
52+
```
53+
54+
4. Update the version string in `CLAUDE.md` (Overview section).
55+
56+
5. Push a `v*` tag to trigger CI and publish to PyPI:
57+
```bash
58+
git tag v<new-tag>
59+
git push origin main --tags
60+
```

capstone

Submodule capstone updated 506 files

python-rename.patch

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,3 +37,60 @@ index 2d820132..88192862 100755
3737
},
3838
has_ext_modules=lambda: True, # It's not a Pure Python wheel
3939
# to have ABI3 tagged wheel
40+
diff --git a/bindings/python/capstone/arm64.py b/bindings/python/capstone/arm64.py
41+
deleted file mode 100644
42+
index 6799c25e..00000000
43+
--- a/bindings/python/capstone/arm64.py
44+
+++ /dev/null
45+
@@ -1,4 +0,0 @@
46+
-# Copyright © 2024 Peace-Maker <peacemakerctf@gmail.com>
47+
-# SPDX-License-Identifier: BSD-3
48+
-# Compatibility header with pre v6 API
49+
-from .arm64_const import *
50+
diff --git a/bindings/python/capstone/arm64_const.py b/bindings/python/capstone/arm64_const.py
51+
deleted file mode 100644
52+
index cbbcaa6d..00000000
53+
--- a/bindings/python/capstone/arm64_const.py
54+
+++ /dev/null
55+
@@ -1,18 +0,0 @@
56+
-# Copyright © 2024 Peace-Maker <peacemakerctf@gmail.com>
57+
-# SPDX-License-Identifier: BSD-3
58+
-# Compatibility header with pre v6 API
59+
-import capstone
60+
-import capstone.aarch64_const
61+
-
62+
-setattr(capstone, "CS_ARCH_ARM64", capstone.CS_ARCH_AARCH64)
63+
-setattr(capstone, "__all__", getattr(capstone, "__all__") + ["CS_ARCH_ARM64"])
64+
-globals().update(
65+
- (name.replace("AARCH64", "ARM64"), getattr(capstone.aarch64_const, name))
66+
- for name in capstone.aarch64_const.__dict__
67+
- if name.startswith("AARCH64")
68+
-)
69+
-globals().update(
70+
- (name.replace("AArch64CC", "ARM64_CC"), getattr(capstone.aarch64_const, name))
71+
- for name in capstone.aarch64_const.__dict__
72+
- if name.startswith("AArch64CC")
73+
-)
74+
diff --git a/bindings/python/capstone/sysz_const.py b/bindings/python/capstone/sysz_const.py
75+
deleted file mode 100644
76+
index 3cae5c76..00000000
77+
--- a/bindings/python/capstone/sysz_const.py
78+
+++ /dev/null
79+
@@ -1,17 +0,0 @@
80+
-# Copyright © 2024 Peace-Maker <peacemakerctf@gmail.com>
81+
-# SPDX-License-Identifier: BSD-3
82+
-# Compatibility header with pre v6 API
83+
-import capstone
84+
-import capstone.systemz
85+
-import capstone.systemz_const
86+
-
87+
-setattr(capstone, "CS_ARCH_SYSZ", capstone.CS_ARCH_SYSTEMZ)
88+
-setattr(capstone, "__all__", getattr(capstone, "__all__") + ["CS_ARCH_SYSZ"])
89+
-compatibility_constants = [
90+
- (name.replace("SYSTEMZ", "SYSZ"), getattr(capstone.systemz_const, name))
91+
- for name in capstone.systemz_const.__dict__
92+
- if name.startswith("SYSTEMZ")
93+
-]
94+
-globals().update(compatibility_constants)
95+
-for name, value in compatibility_constants:
96+
- setattr(capstone.systemz, name, value)

0 commit comments

Comments
 (0)