mirror of
https://github.com/radareorg/r2hermes.git
synced 2026-11-12 08:21:29 -10:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
911c520da5 | ||
|
|
5d77df7091 | ||
|
|
722793f084 | ||
|
|
0b53e148fb | ||
|
|
a93ca6767d | ||
|
|
e3f5b7e560 | ||
|
|
47279d355c |
No files matched your search
@@ -4,8 +4,5 @@ updates:
|
||||
directory: "/"
|
||||
schedule:
|
||||
interval: "weekly"
|
||||
commit-message:
|
||||
prefix: "##build "
|
||||
prefix-development: "##build "
|
||||
labels:
|
||||
- buildsystem
|
||||
+18
-18
@@ -1,7 +1,7 @@
|
||||
name: CI
|
||||
|
||||
env:
|
||||
R2V: 6.2.2
|
||||
R2V: 6.2.6
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
@@ -19,14 +19,14 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v7
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Install build deps
|
||||
run: sudo apt-get update -y && sudo apt-get install -y build-essential autoconf automake libtool pkg-config
|
||||
- name: Install radare2
|
||||
id: r2
|
||||
uses: radareorg/github-actions@v3
|
||||
uses: radareorg/github-actions@4ae27a8b29a049ac0fd5119f6eda37ecfc64ead8 # v3
|
||||
with:
|
||||
version: ${{ env.R2V }}
|
||||
- name: Build library
|
||||
@@ -57,7 +57,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v7
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
@@ -66,7 +66,7 @@ jobs:
|
||||
|
||||
- name: Install radare2
|
||||
id: r2
|
||||
uses: radareorg/github-actions@v3
|
||||
uses: radareorg/github-actions@4ae27a8b29a049ac0fd5119f6eda37ecfc64ead8 # v3
|
||||
with:
|
||||
version: ${{ env.R2V }}
|
||||
|
||||
@@ -74,7 +74,7 @@ jobs:
|
||||
run: make -C dist/debian SUDO=
|
||||
|
||||
- name: Upload Debian package artifact
|
||||
uses: actions/upload-artifact@v7
|
||||
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
|
||||
with:
|
||||
name: debian-package
|
||||
path: dist/debian/*.deb
|
||||
@@ -86,10 +86,10 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v7
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
|
||||
- name: Setup Python
|
||||
uses: actions/setup-python@v6
|
||||
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
|
||||
with:
|
||||
python-version: 3.12.x
|
||||
|
||||
@@ -100,7 +100,7 @@ jobs:
|
||||
|
||||
- name: Install radare2
|
||||
id: r2
|
||||
uses: radareorg/github-actions@v3
|
||||
uses: radareorg/github-actions@4ae27a8b29a049ac0fd5119f6eda37ecfc64ead8 # v3
|
||||
with:
|
||||
version: ${{ env.R2V }}
|
||||
|
||||
@@ -140,7 +140,7 @@ jobs:
|
||||
Compress-Archive -Path bindist\* -DestinationPath "r2hermes-$env:R2V-windows-x86-64.zip" -Force
|
||||
|
||||
- name: Upload Windows package artifact
|
||||
uses: actions/upload-artifact@v7
|
||||
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
|
||||
with:
|
||||
name: windows-package
|
||||
path: r2hermes-*.zip
|
||||
@@ -155,10 +155,10 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v7
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
|
||||
- name: Install radare2
|
||||
uses: radareorg/github-actions@v3
|
||||
uses: radareorg/github-actions@4ae27a8b29a049ac0fd5119f6eda37ecfc64ead8 # v3
|
||||
with:
|
||||
version: ${{ env.R2V }}
|
||||
|
||||
@@ -166,7 +166,7 @@ jobs:
|
||||
run: make bindist
|
||||
|
||||
- name: Upload r2pm binary artifact
|
||||
uses: actions/upload-artifact@v7
|
||||
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
|
||||
with:
|
||||
name: bindist-${{ matrix.os }}
|
||||
path: r2hermes-*.zip
|
||||
@@ -180,7 +180,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v7
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
@@ -192,26 +192,26 @@ jobs:
|
||||
ls -l libhbc*
|
||||
|
||||
- name: Download Debian package artifact
|
||||
uses: actions/download-artifact@v8
|
||||
uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
|
||||
with:
|
||||
name: debian-package
|
||||
path: release-artifacts
|
||||
|
||||
- name: Download Windows package artifact
|
||||
uses: actions/download-artifact@v8
|
||||
uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
|
||||
with:
|
||||
name: windows-package
|
||||
path: release-artifacts/windows
|
||||
|
||||
- name: Download r2pm binary artifacts
|
||||
uses: actions/download-artifact@v8
|
||||
uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
|
||||
with:
|
||||
pattern: bindist-*
|
||||
merge-multiple: true
|
||||
path: release-artifacts/bindist
|
||||
|
||||
- name: Create GitHub Release
|
||||
uses: softprops/[email protected].1
|
||||
uses: softprops/action-gh-release@efb35369e0ad2afab669f228072c1b0d510eae64 # v3.0.3
|
||||
with:
|
||||
tag_name: ${{ needs.build.outputs.tag }}
|
||||
files: |
|
||||
|
||||
@@ -14,7 +14,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v7
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
@@ -23,7 +23,7 @@ jobs:
|
||||
|
||||
- name: Install radare2
|
||||
id: r2
|
||||
uses: radareorg/github-actions@v3
|
||||
uses: radareorg/github-actions@4ae27a8b29a049ac0fd5119f6eda37ecfc64ead8 # v3
|
||||
with:
|
||||
version: ${{ env.R2V }}
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ jobs:
|
||||
runs-on: ubuntu-24.04
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v7
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Checkout TinyCC repository
|
||||
@@ -49,7 +49,7 @@ jobs:
|
||||
runs-on: ubuntu-24.04
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v7
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Install build dependencies
|
||||
|
||||
@@ -14,10 +14,10 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v7
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
|
||||
- name: Setup Python
|
||||
uses: actions/setup-python@v6
|
||||
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
|
||||
with:
|
||||
python-version: 3.12.x
|
||||
|
||||
@@ -28,7 +28,7 @@ jobs:
|
||||
|
||||
- name: Install radare2
|
||||
id: r2
|
||||
uses: radareorg/github-actions@v3
|
||||
uses: radareorg/github-actions@4ae27a8b29a049ac0fd5119f6eda37ecfc64ead8 # v3
|
||||
with:
|
||||
version: ${{ env.R2V }}
|
||||
|
||||
@@ -60,7 +60,7 @@ jobs:
|
||||
Compress-Archive -Path install\* -DestinationPath r2hermes-windows-x64.zip -Force
|
||||
|
||||
- name: Upload artifacts
|
||||
uses: actions/upload-artifact@v7
|
||||
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
|
||||
with:
|
||||
name: windows-package
|
||||
path: r2hermes-windows-x64.zip
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
.pmai/
|
||||
build/
|
||||
bin/
|
||||
third_party/
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
project(
|
||||
'r2hermes',
|
||||
'c',
|
||||
version: '1.5.3',
|
||||
version: '1.6.2',
|
||||
license: 'MIT',
|
||||
default_options: [
|
||||
'c_std=c11',
|
||||
|
||||
@@ -2962,7 +2962,7 @@ Result _hbc_output_code(HermesDecompiler *state, DecompiledFunctionBody *functio
|
||||
for (HbcTokenString *si_iter = R_VEC_START_ITER (&function_body->statements); si_iter != R_VEC_END_ITER (&function_body->statements); si_iter++) {
|
||||
size_t si = (size_t) (si_iter - R_VEC_START_ITER (&function_body->statements));
|
||||
/* Stop when budget exhausted or earlier phase (pass2) flagged it. */
|
||||
if (state->output_truncated || (state->options.max_output_bytes > 0 && r_strbuf_length (out) >= state->options.max_output_bytes)) {
|
||||
if (state->output_truncated || (state->options.max_output_bytes > 0 && r_strbuf_length (out) >= (size_t)state->options.max_output_bytes)) {
|
||||
state->output_truncated = true;
|
||||
if (!state->truncation_marker_emitted) {
|
||||
state->truncation_marker_emitted = true;
|
||||
|
||||
@@ -3,16 +3,23 @@
|
||||
/* Core HBC plugin with plugin registration enabled for r2one */
|
||||
|
||||
#define HBC_CORE_REGISTER_PLUGINS 1
|
||||
// radare2 defines R2_PLUGIN_INCORE when linking us statically (XPS)
|
||||
#ifdef R2_PLUGIN_INCORE
|
||||
#define HBC_STATIC_INCORE 1
|
||||
#else
|
||||
#define R2_PLUGIN_INCORE 1
|
||||
#endif
|
||||
#include "asm_hbc.c"
|
||||
#include "bin_hbc.c"
|
||||
#include "arch_hbc.c"
|
||||
#undef HBC_VADDR_BASE
|
||||
#include "core_hbc.c"
|
||||
|
||||
#ifndef HBC_STATIC_INCORE
|
||||
R_API RLibStruct radare_plugin = {
|
||||
.type = R_LIB_TYPE_CORE,
|
||||
.data = (void *)&r_core_plugin_r2hermes,
|
||||
.version = R2_VERSION,
|
||||
.abiversion = R2_ABIVERSION
|
||||
};
|
||||
#endif
|
||||
@@ -146,7 +146,7 @@ RUN
|
||||
NAME=hbc exception handlers are exposed through bin metadata
|
||||
FILE=bins/hbc/index.android.bundle
|
||||
CMDS=<<EOF
|
||||
iw~try.0
|
||||
iw*~try.0
|
||||
EOF
|
||||
EXPECT=<<EOF
|
||||
f try.0.1003e6dc.from=0x1003e703
|
||||
|
||||
Reference in new issue
Block a user