mirror of
https://github.com/lifting-bits/sleigh
synced 2026-06-21 13:56:12 +00:00
Compare commits
18 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| f9c852bc57 | |||
| 3e96d296e0 | |||
| 9d4d450551 | |||
| 184fabc5aa | |||
| 4cedffc104 | |||
| 873108dd0e | |||
| 4ddd7f2f89 | |||
| 00f42b7ef7 | |||
| 31868c9d70 | |||
| a96b7fdcc6 | |||
| 78ed150957 | |||
| bc2f60c4b8 | |||
| 85a209708f | |||
| 6f193278c1 | |||
| df49d10291 | |||
| d2f443e358 | |||
| b871c4a6b8 | |||
| 58f4812a02 |
+15
-12
@@ -56,6 +56,7 @@ jobs:
|
||||
max_attempts: 3
|
||||
command: |
|
||||
choco install ccache doxygen.install graphviz
|
||||
Add-Content -Path $env:GITHUB_ENV -Value "CCACHE_EXE=$(Resolve-Path C:\ProgramData\chocolatey\lib\ccache\tools\*\ccache.exe)"
|
||||
vcpkg install zlib:x64-windows-static
|
||||
|
||||
- name: Generate cache key
|
||||
@@ -100,17 +101,19 @@ jobs:
|
||||
run: cmake "--preset=ci-$("${{ matrix.os }}".split("-")[0])"
|
||||
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
|
||||
-Dsleigh_RELEASE_TYPE=${{ matrix.release }}
|
||||
"-DCMAKE_PROJECT_INCLUDE:FILEPATH=${{ github.workspace }}/cmake/ccache-msvc.cmake"
|
||||
-DCMAKE_MSVC_DEBUG_INFORMATION_FORMAT=Embedded
|
||||
|
||||
- name: Build the project
|
||||
run: cmake
|
||||
--build build
|
||||
--config ${{ matrix.build_type }}
|
||||
-j 2
|
||||
-j 4
|
||||
-v
|
||||
|
||||
- name: Test the project
|
||||
working-directory: build
|
||||
run: ctest -VV -C ${{ matrix.build_type }}
|
||||
run: ctest -VV -C ${{ matrix.build_type }} ${{ matrix.release == 'HEAD' && '|| true' || '' }}
|
||||
|
||||
- name: Build the docs
|
||||
run: cmake
|
||||
@@ -122,7 +125,7 @@ jobs:
|
||||
- name: Run the example
|
||||
run: cmake
|
||||
--build build
|
||||
-j 2
|
||||
-j 4
|
||||
--config ${{ matrix.build_type }}
|
||||
--target sleigh_example_runner
|
||||
|
||||
@@ -142,7 +145,7 @@ jobs:
|
||||
working-directory: tests/find_package
|
||||
run: |
|
||||
cmake -B build -S . "-Dsleigh_DIR=${{ github.workspace }}/install/lib/cmake/sleigh" -DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
|
||||
cmake --build build -j 2 --config ${{ matrix.build_type }}
|
||||
cmake --build build -j 4 --config ${{ matrix.build_type }}
|
||||
cd build
|
||||
ctest -V -C ${{ matrix.build_type }}
|
||||
- name: Test install directory Windows
|
||||
@@ -150,7 +153,7 @@ jobs:
|
||||
working-directory: tests/find_package
|
||||
run: |
|
||||
cmake -B build -S . "-Dsleigh_DIR=${{ github.workspace }}/install/lib/cmake/sleigh" -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} "-DCMAKE_TOOLCHAIN_FILE=$env:VCPKG_INSTALLATION_ROOT/scripts/buildsystems/vcpkg.cmake" -DVCPKG_TARGET_TRIPLET=x64-windows-static
|
||||
cmake --build build -j 2 --config ${{ matrix.build_type }}
|
||||
cmake --build build -j 4 --config ${{ matrix.build_type }}
|
||||
cd build
|
||||
ctest -V -C ${{ matrix.build_type }}
|
||||
|
||||
@@ -159,7 +162,7 @@ jobs:
|
||||
working-directory: extra-tools/sleigh-lift
|
||||
run: |
|
||||
cmake -B build -S . "-Dsleigh_DIR=${{ github.workspace }}/install/lib/cmake/sleigh" -DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
|
||||
cmake --build build -j 2 --config ${{ matrix.build_type }}
|
||||
cmake --build build -j 4 --config ${{ matrix.build_type }}
|
||||
cmake --install build --config ${{ matrix.build_type }} --prefix install
|
||||
./install/bin/sleigh-lift --version
|
||||
./install/bin/sleigh-lift disassemble x86-64.sla 4881ecc00f0000
|
||||
@@ -169,7 +172,7 @@ jobs:
|
||||
working-directory: extra-tools/sleigh-lift
|
||||
run: |
|
||||
cmake -B build -S . "-Dsleigh_DIR=${{ github.workspace }}/install/lib/cmake/sleigh" -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} "-DCMAKE_TOOLCHAIN_FILE=$env:VCPKG_INSTALLATION_ROOT/scripts/buildsystems/vcpkg.cmake" -DVCPKG_TARGET_TRIPLET=x64-windows-static
|
||||
cmake --build build -j 2 --config ${{ matrix.build_type }}
|
||||
cmake --build build -j 4 --config ${{ matrix.build_type }}
|
||||
cmake --install build --config ${{ matrix.build_type }} --prefix install
|
||||
./install/bin/sleigh-lift --version
|
||||
./install/bin/sleigh-lift disassemble x86-64.sla 4881ecc00f0000
|
||||
@@ -178,7 +181,7 @@ jobs:
|
||||
- name: Create the packages
|
||||
run: cmake
|
||||
--build build
|
||||
-j 2
|
||||
-j 4
|
||||
--config ${{ matrix.build_type }}
|
||||
--target package
|
||||
|
||||
@@ -188,7 +191,7 @@ jobs:
|
||||
sudo dpkg -i build/*.deb
|
||||
|
||||
cmake -S tests/find_package -B find_package_build -DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
|
||||
cmake --build find_package_build -j 2 --config ${{ matrix.build_type }} --verbose
|
||||
cmake --build find_package_build -j 4 --config ${{ matrix.build_type }} --verbose
|
||||
|
||||
- name: Locate the packages (RelWithDebInfo only)
|
||||
if: matrix.build_type == 'RelWithDebInfo'
|
||||
@@ -217,7 +220,7 @@ jobs:
|
||||
path: ${{ env.DEB_PACKAGE_PATH }}
|
||||
|
||||
- name: Release DEB package artifact (RelWithDebInfo only)
|
||||
uses: softprops/action-gh-release@v2.2.1
|
||||
uses: softprops/action-gh-release@v2.2.2
|
||||
if: matrix.build_type == 'RelWithDebInfo' && runner.os == 'Linux' && startsWith(github.ref, 'refs/tags/') && matrix.release == 'stable'
|
||||
with:
|
||||
files: ${{ env.DEB_PACKAGE_PATH }}
|
||||
@@ -230,7 +233,7 @@ jobs:
|
||||
name: ${{ env.RPM_PACKAGE_NAME }}
|
||||
path: ${{ env.RPM_PACKAGE_PATH }}
|
||||
- name: Release RPM package artifact (RelWithDebInfo only)
|
||||
uses: softprops/action-gh-release@v2.2.1
|
||||
uses: softprops/action-gh-release@v2.2.2
|
||||
if: matrix.build_type == 'RelWithDebInfo' && runner.os == 'Linux' && startsWith(github.ref, 'refs/tags/') && matrix.release == 'stable'
|
||||
with:
|
||||
files: ${{ env.RPM_PACKAGE_PATH }}
|
||||
@@ -244,7 +247,7 @@ jobs:
|
||||
path: ${{ env.TGZ_PACKAGE_PATH }}
|
||||
|
||||
- name: Release TGZ package artifact (RelWithDebInfo only)
|
||||
uses: softprops/action-gh-release@v2.2.1
|
||||
uses: softprops/action-gh-release@v2.2.2
|
||||
if: matrix.build_type == 'RelWithDebInfo' && startsWith(github.ref, 'refs/tags/') && matrix.release == 'stable'
|
||||
with:
|
||||
files: ${{ env.TGZ_PACKAGE_PATH }}
|
||||
|
||||
@@ -45,10 +45,18 @@ jobs:
|
||||
Changed files:
|
||||
|
||||
${{ steps.head_update.outputs.changed_files }}
|
||||
|
||||
Commit details:
|
||||
|
||||
${{ steps.head_update.outputs.commit_details }}
|
||||
body: |
|
||||
Changed files:
|
||||
|
||||
${{ steps.head_update.outputs.changed_files }}
|
||||
|
||||
Commit details:
|
||||
|
||||
${{ steps.head_update.outputs.commit_details }}
|
||||
branch: cron/update-ghidra-${{ steps.head_update.outputs.short_sha }}
|
||||
delete-branch: true
|
||||
token: ${{ steps.generate-token.outputs.token }}
|
||||
|
||||
@@ -8,6 +8,9 @@
|
||||
|
||||
cmake_minimum_required(VERSION 3.18)
|
||||
|
||||
# For MSVC ccache to use /Z7 with CMAKE_MSVC_DEBUG_INFORMATION_FORMAT=Embedded
|
||||
cmake_policy(SET CMP0141 NEW)
|
||||
|
||||
include(cmake/prelude.cmake)
|
||||
|
||||
# Sets "library_root" variable for decompiler cpp root directory
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
# This module configures ccache to work with MSVC
|
||||
# Based on: https://github.com/ccache/ccache/wiki/MS-Visual-Studio
|
||||
|
||||
# Only do this for Windows MSVC builds
|
||||
if(NOT WIN32 OR NOT CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
|
||||
return()
|
||||
endif()
|
||||
|
||||
# Assume the parent environment has this set
|
||||
# Chocolatey creates a shim which doesn't work when renamed
|
||||
set(CCACHE_EXE "$ENV{CCACHE_EXE}")
|
||||
if(NOT CCACHE_EXE)
|
||||
message(STATUS "ccache not found - MSVC ccache support disabled")
|
||||
return()
|
||||
endif()
|
||||
message(STATUS "Found ccache - ${CCACHE_EXE}")
|
||||
|
||||
message(STATUS "Configuring ccache for MSVC")
|
||||
|
||||
file(COPY_FILE
|
||||
"${CCACHE_EXE}" "${CMAKE_BINARY_DIR}/cl.exe"
|
||||
ONLY_IF_DIFFERENT)
|
||||
|
||||
# By default Visual Studio generators will use /Zi which is not compatible
|
||||
# with ccache, so tell Visual Studio to use /Z7 instead.
|
||||
message(STATUS "Setting MSVC debug information format to 'Embedded'")
|
||||
set(CMAKE_MSVC_DEBUG_INFORMATION_FORMAT "$<$<CONFIG:Debug,RelWithDebInfo>:Embedded>")
|
||||
|
||||
set(CMAKE_VS_GLOBALS
|
||||
"CLToolExe=cl.exe"
|
||||
"CLToolPath=${CMAKE_BINARY_DIR}"
|
||||
"UseMultiToolTask=true"
|
||||
"DebugInformationFormat=OldStyle"
|
||||
)
|
||||
+178
-26
@@ -1,11 +1,13 @@
|
||||
"""Script to update CMake files for latest Ghidra Sleigh changes"""
|
||||
|
||||
import re
|
||||
import shutil
|
||||
import subprocess
|
||||
import sys
|
||||
import tempfile
|
||||
import os
|
||||
from pathlib import Path
|
||||
from typing import AnyStr, Union, List
|
||||
from typing import AnyStr, Union, List, Dict
|
||||
|
||||
PROJECT_ROOT = Path(__file__).parent.parent.resolve()
|
||||
HEAD_SPEC_FILE = PROJECT_ROOT / "src" / "spec_files_HEAD.cmake"
|
||||
@@ -25,8 +27,8 @@ GIT_EXE = shutil.which("git")
|
||||
assert GIT_EXE is not None
|
||||
|
||||
|
||||
def msg(s: str) -> None:
|
||||
print(f"[!] {s}")
|
||||
def msg(s: str, end: str = "\n") -> None:
|
||||
print(f"[!] {s}", end=end)
|
||||
|
||||
|
||||
PathString = Union[AnyStr, Path]
|
||||
@@ -48,11 +50,92 @@ def clone_ghidra_git(clone_dir: PathString) -> None:
|
||||
)
|
||||
|
||||
|
||||
def git_get_commit_info(
|
||||
repo: Path, old_commit: str, new_commit: str, paths: List[str]
|
||||
) -> List[Dict[str, str]]:
|
||||
"""Get detailed information about commits that modified the specified paths"""
|
||||
assert GIT_EXE is not None
|
||||
log_output = (
|
||||
subprocess.run(
|
||||
[
|
||||
GIT_EXE,
|
||||
"log",
|
||||
"--pretty=format:%H%n%ad%n%s%n%b%n====",
|
||||
"--date=iso",
|
||||
f"{old_commit}..{new_commit}",
|
||||
"--",
|
||||
*paths,
|
||||
],
|
||||
cwd=repo,
|
||||
capture_output=True,
|
||||
check=True,
|
||||
)
|
||||
.stdout.decode()
|
||||
.strip()
|
||||
)
|
||||
|
||||
commits = []
|
||||
if log_output:
|
||||
commit_sections = log_output.split("\n====")
|
||||
# Process each commit
|
||||
for section in commit_sections:
|
||||
if not section.strip():
|
||||
continue
|
||||
lines = section.strip().split("\n")
|
||||
commit_hash = lines[0]
|
||||
commit_date = lines[1]
|
||||
commit_msg = lines[2]
|
||||
body = "\n".join(lines[3:]) if len(lines) > 3 else ""
|
||||
|
||||
# Get the files modified in this commit
|
||||
commit_files = (
|
||||
subprocess.run(
|
||||
[
|
||||
GIT_EXE,
|
||||
"diff-tree",
|
||||
"--no-commit-id",
|
||||
"--name-status",
|
||||
"-r",
|
||||
commit_hash,
|
||||
"--",
|
||||
*paths,
|
||||
],
|
||||
cwd=repo,
|
||||
capture_output=True,
|
||||
check=True,
|
||||
)
|
||||
.stdout.decode()
|
||||
.strip()
|
||||
.splitlines()
|
||||
)
|
||||
|
||||
# Filter out Java files
|
||||
commit_files = list(filter(lambda p: not p.endswith(".java"), commit_files))
|
||||
|
||||
if commit_files:
|
||||
commits.append(
|
||||
{
|
||||
"hash": commit_hash,
|
||||
"date": commit_date,
|
||||
"message": commit_msg,
|
||||
"body": body,
|
||||
"files": commit_files,
|
||||
}
|
||||
)
|
||||
|
||||
return commits
|
||||
|
||||
|
||||
def git_get_changed_files(
|
||||
repo: Path, old_commit: str, new_commit: str, paths: List[str], ci: bool
|
||||
) -> List[str]:
|
||||
"""Get list of changed files from old_commit to new_commit at the specified paths"""
|
||||
assert GIT_EXE is not None
|
||||
|
||||
# Get all commits that change the relevant files
|
||||
commit_info = git_get_commit_info(repo, old_commit, new_commit, paths)
|
||||
|
||||
# Also get the overall diff for summary
|
||||
changed_files = (
|
||||
subprocess.run(
|
||||
[
|
||||
@@ -73,9 +156,25 @@ def git_get_changed_files(
|
||||
)
|
||||
changed_files = list(filter(lambda p: not p.endswith(".java"), changed_files))
|
||||
num_changed = len(changed_files)
|
||||
|
||||
if num_changed > 0:
|
||||
msg(f"Found {num_changed} changed sleigh files:")
|
||||
print("\n".join(changed_files))
|
||||
|
||||
# Display detailed commit information
|
||||
if commit_info:
|
||||
msg(f"Commits affecting sleigh files ({len(commit_info)}):", "")
|
||||
for i, commit in enumerate(commit_info, 1):
|
||||
print(f"\n[Commit {i}/{len(commit_info)}]")
|
||||
print(f"Hash: {commit['hash']}")
|
||||
print(f"Date: {commit['date']}")
|
||||
print(f"Message: {commit['message']}")
|
||||
if commit["body"]:
|
||||
print(f"Details:\n{commit['body']}")
|
||||
print("\nFiles changed:")
|
||||
for file in commit["files"]:
|
||||
print(f" {file}")
|
||||
|
||||
if ci:
|
||||
with open(os.environ["GITHUB_OUTPUT"], "a") as gh_out:
|
||||
gh_out.write("changed_files<<EOF\n")
|
||||
@@ -83,6 +182,23 @@ def git_get_changed_files(
|
||||
gh_out.write("\n".join(changed_files))
|
||||
gh_out.write("\n```\n")
|
||||
gh_out.write("EOF\n")
|
||||
|
||||
if commit_info:
|
||||
gh_out.write("commit_details<<EOF\n")
|
||||
gh_out.write("```")
|
||||
for i, commit in enumerate(commit_info, 1):
|
||||
gh_out.write(f"\n[Commit {i}/{len(commit_info)}]\n")
|
||||
gh_out.write(f"Hash: {commit['hash']}\n")
|
||||
gh_out.write(f"Date: {commit['date']}\n")
|
||||
gh_out.write(f"Message: {commit['message']}\n")
|
||||
if commit["body"]:
|
||||
gh_out.write(f"Details:\n{commit['body']}\n")
|
||||
gh_out.write("\nFiles changed:\n")
|
||||
for file in commit["files"]:
|
||||
gh_out.write(f" {file}\n")
|
||||
gh_out.write("```\n")
|
||||
gh_out.write("EOF\n")
|
||||
|
||||
return changed_files
|
||||
|
||||
|
||||
@@ -97,7 +213,11 @@ def is_sleigh_updated(
|
||||
|
||||
|
||||
def update_head_commit(
|
||||
setup_file: Path, ghidra_repo_dir: PathString, latest_commit: str, ci: bool
|
||||
setup_file: Path,
|
||||
ghidra_repo_dir: PathString,
|
||||
latest_commit: str,
|
||||
ci: bool,
|
||||
dry_run: bool = False,
|
||||
) -> bool:
|
||||
"""Edit the Ghidra script to point to the latest commit"""
|
||||
head_commit_line = r"set\(ghidra_head_git_tag \"([0-9A-Fa-f]+)\"\)"
|
||||
@@ -115,24 +235,35 @@ def update_head_commit(
|
||||
if is_sleigh_updated(
|
||||
ghidra_repo_dir, current_commit, latest_commit, ci
|
||||
):
|
||||
line = re.sub(
|
||||
head_commit_line,
|
||||
f'set(ghidra_head_git_tag "{latest_commit}")',
|
||||
line,
|
||||
)
|
||||
updated = True
|
||||
if dry_run:
|
||||
msg(
|
||||
f"Would update commit from {current_commit} to {latest_commit}"
|
||||
)
|
||||
updated = True
|
||||
else:
|
||||
line = re.sub(
|
||||
head_commit_line,
|
||||
f'set(ghidra_head_git_tag "{latest_commit}")',
|
||||
line,
|
||||
)
|
||||
updated = True
|
||||
else:
|
||||
msg("No sleigh files updated")
|
||||
w.write(line)
|
||||
|
||||
# Make the swap with the new content
|
||||
shutil.copymode(setup_file, abspath)
|
||||
os.remove(setup_file)
|
||||
shutil.move(abspath, setup_file)
|
||||
if not dry_run:
|
||||
shutil.copymode(setup_file, abspath)
|
||||
os.remove(setup_file)
|
||||
shutil.move(abspath, setup_file)
|
||||
else:
|
||||
os.remove(abspath) # Clean up the temp file in dry run mode
|
||||
return updated
|
||||
|
||||
|
||||
def update_head_version_file(setup_file: Path, ghidra_root_dir: PathString) -> None:
|
||||
def update_head_version_file(
|
||||
setup_file: Path, ghidra_root_dir: PathString, dry_run: bool = False
|
||||
) -> None:
|
||||
"""Edit the Ghidra script to point to the latest version"""
|
||||
cmake_head_version_line = (
|
||||
r"set\(ghidra_head_version \"([0-9]+(\.[0-9]+)?(\.[0-9]+)?)\"\)"
|
||||
@@ -153,10 +284,14 @@ def update_head_version_file(setup_file: Path, ghidra_root_dir: PathString) -> N
|
||||
cmake_version = match.group(1)
|
||||
|
||||
if cmake_version == source_version:
|
||||
msg(f"No new version bump")
|
||||
msg("No new version bump")
|
||||
return
|
||||
|
||||
msg(f"Found new version: {source_version}")
|
||||
if dry_run:
|
||||
msg(f"Would update version from {cmake_version} to {source_version}")
|
||||
return
|
||||
|
||||
fd, abspath = tempfile.mkstemp()
|
||||
with open(fd, "w") as w:
|
||||
with setup_file.open("r") as r:
|
||||
@@ -176,7 +311,9 @@ def update_head_version_file(setup_file: Path, ghidra_root_dir: PathString) -> N
|
||||
shutil.move(abspath, setup_file)
|
||||
|
||||
|
||||
def update_spec_files(ghidra_repo_dir: PathString, cmake_file: PathString):
|
||||
def update_spec_files(
|
||||
ghidra_repo_dir: PathString, cmake_file: PathString, dry_run: bool = False
|
||||
):
|
||||
"""Based on the files in the Ghidra repo, write an updated list of spec files."""
|
||||
spec_files = []
|
||||
for dirpath, _, fnames in os.walk(ghidra_repo_dir / "Ghidra" / "Processors"):
|
||||
@@ -211,7 +348,11 @@ def get_latest_commit(ghidra_repo_dir: PathString) -> str:
|
||||
|
||||
|
||||
def update_head(
|
||||
setup_file: Path, spec_file: Path, ghidra_repo_dir: PathString, ci: bool
|
||||
setup_file: Path,
|
||||
spec_file: Path,
|
||||
ghidra_repo_dir: PathString,
|
||||
ci: bool,
|
||||
dry_run: bool = False,
|
||||
) -> bool:
|
||||
"""Update to latest head and make changes to the CMake files"""
|
||||
tmpdirname = None
|
||||
@@ -222,15 +363,15 @@ def update_head(
|
||||
|
||||
latest_commit = get_latest_commit(ghidra_repo_dir)
|
||||
did_update_commit = update_head_commit(
|
||||
setup_file, ghidra_repo_dir, latest_commit, ci
|
||||
setup_file, ghidra_repo_dir, latest_commit, ci, dry_run
|
||||
)
|
||||
if did_update_commit:
|
||||
if ci:
|
||||
with open(os.environ["GITHUB_OUTPUT"], "a") as gh_out:
|
||||
gh_out.write(f"short_sha={latest_commit[:9]}\n")
|
||||
gh_out.write("did_update=true\n")
|
||||
update_spec_files(ghidra_repo_dir, spec_file)
|
||||
update_head_version_file(setup_file, ghidra_repo_dir)
|
||||
update_spec_files(ghidra_repo_dir, spec_file, dry_run)
|
||||
update_head_version_file(setup_file, ghidra_repo_dir, dry_run)
|
||||
else:
|
||||
msg(f"Already at the latest commit: {latest_commit}")
|
||||
|
||||
@@ -244,7 +385,8 @@ def update_head(
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
import argparse, os
|
||||
import argparse
|
||||
import os
|
||||
|
||||
def dir_path(string):
|
||||
if string is None:
|
||||
@@ -268,14 +410,24 @@ if __name__ == "__main__":
|
||||
action="store_true",
|
||||
help="Output GitHub Actions commands for recording information in CI",
|
||||
)
|
||||
parser.add_argument(
|
||||
"--dry-run",
|
||||
action="store_true",
|
||||
help="Show what would be changed without actually modifying any files",
|
||||
)
|
||||
args = parser.parse_args()
|
||||
|
||||
if args.ci:
|
||||
assert (
|
||||
"GITHUB_OUTPUT" in os.environ
|
||||
), "CI needs `GITHUB_OUTPUT` environment variable set to a file location"
|
||||
assert "GITHUB_OUTPUT" in os.environ, (
|
||||
"CI needs `GITHUB_OUTPUT` environment variable set to a file location"
|
||||
)
|
||||
|
||||
if not update_head(SETUP_GHIDRA_FILE, HEAD_SPEC_FILE, args.ghidra_repo, args.ci):
|
||||
if not update_head(
|
||||
SETUP_GHIDRA_FILE, HEAD_SPEC_FILE, args.ghidra_repo, args.ci, args.dry_run
|
||||
):
|
||||
msg("No update required")
|
||||
else:
|
||||
msg("Update required!")
|
||||
if args.dry_run:
|
||||
msg("Update would be required!")
|
||||
else:
|
||||
msg("Update required!")
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From e694ad80e2965178c541a7414e55c76a1e318411 Mon Sep 17 00:00:00 2001
|
||||
From b25de9d74c90bd1216e10b5697a27c3815641621 Mon Sep 17 00:00:00 2001
|
||||
From: Eric Kilmer <eric.d.kilmer@gmail.com>
|
||||
Date: Mon, 12 Aug 2024 12:02:35 -0400
|
||||
Subject: [PATCH 1/6] Fix UBSAN errors in decompiler
|
||||
@@ -220,5 +220,5 @@ index 2571f55f1a..fe40e22b1b 100644
|
||||
uintb true_result = ((uintb)(int32_t)f) & 0xffffffff;
|
||||
uintb encoding = format.getEncoding(f);
|
||||
--
|
||||
2.48.1
|
||||
2.49.0
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From cc36245a600051a66a4ab6c6ffff835d609ae92a Mon Sep 17 00:00:00 2001
|
||||
From 1bd544111236b4b8f88429a074788e6616b05a38 Mon Sep 17 00:00:00 2001
|
||||
From: Alex Cameron <asc@tetsuo.sh>
|
||||
Date: Wed, 3 Aug 2022 20:01:18 +1000
|
||||
Subject: [PATCH 2/6] Use `stroull` instead of `stroul` to parse address
|
||||
@@ -34,5 +34,5 @@ index dbaa2e775f..72927bf379 100644
|
||||
enddata = (const char *) tmpdata;
|
||||
if (enddata - s.c_str() == s.size()) { // If no size or offset override
|
||||
--
|
||||
2.48.1
|
||||
2.49.0
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From f0ee9c783a7acd850f6565278842a23865441e6a Mon Sep 17 00:00:00 2001
|
||||
From f3b2fd0b950221005e02d294ef665e38d7f68b12 Mon Sep 17 00:00:00 2001
|
||||
From: Eric Kilmer <eric.d.kilmer@gmail.com>
|
||||
Date: Tue, 29 Oct 2024 15:30:57 -0400
|
||||
Subject: [PATCH 3/6] Use string resize instead of reserve
|
||||
@@ -32,5 +32,5 @@ index 5f5fa0c7b3..4cd77156f2 100644
|
||||
}
|
||||
data.isTruncated = (numChars >= maximumChars);
|
||||
--
|
||||
2.48.1
|
||||
2.49.0
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From 43b0f78ca2ce8e2adbcc4f3b3298940c72dc9b5b Mon Sep 17 00:00:00 2001
|
||||
From 643f66ceb6add640d24a7c4b001e5236dfb8428f Mon Sep 17 00:00:00 2001
|
||||
From: Eric Kilmer <eric.d.kilmer@gmail.com>
|
||||
Date: Tue, 29 Oct 2024 17:51:09 -0400
|
||||
Subject: [PATCH 4/6] Ignore floating point test due to compilation differences
|
||||
@@ -24,5 +24,5 @@ index fe40e22b1b..91440e2510 100644
|
||||
ASSERT_EQUALS(ff.printDecimal(f2, false), "0.33333334");
|
||||
double f3 = doubleFromRawBits(0x3fd0000000000000);
|
||||
--
|
||||
2.48.1
|
||||
2.49.0
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From ef11bf80063c80967a6ddb8726e710bd207575f3 Mon Sep 17 00:00:00 2001
|
||||
From 739a7cabff6e8718102b21bd4c639bb1d468794a Mon Sep 17 00:00:00 2001
|
||||
From: Eric Kilmer <eric.d.kilmer@gmail.com>
|
||||
Date: Wed, 30 Oct 2024 14:26:57 -0400
|
||||
Subject: [PATCH 5/6] Allow positive or negative NAN in decompiler floating
|
||||
@@ -33,5 +33,5 @@ index f8108d3d32..1060a3e193 100644
|
||||
<stringmatch name="Float print #14" min="1" max="1">double7 = 3.1415926535897933e-06;</stringmatch>
|
||||
</decompilertest>
|
||||
--
|
||||
2.48.1
|
||||
2.49.0
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From 5d6886b914c266f0a97941666fda75e0f7311d35 Mon Sep 17 00:00:00 2001
|
||||
From d8ff76548dceea9e1a3a034dfd4967f246a7f716 Mon Sep 17 00:00:00 2001
|
||||
From: Eric Kilmer <eric.d.kilmer@gmail.com>
|
||||
Date: Sat, 8 Feb 2025 17:59:57 -0500
|
||||
Subject: [PATCH 6/6] decompiler: Fix strict weak ordering TypePartialEnum
|
||||
@@ -22,5 +22,5 @@ index f25b019a4f..2f1337a740 100644
|
||||
if (parent != tp->parent) return (parent < tp->parent) ? -1 : 1; // Compare absolute pointers
|
||||
if (offset != tp->offset) return (offset < tp->offset) ? -1 : 1;
|
||||
--
|
||||
2.48.1
|
||||
2.49.0
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ set_property(CACHE sleigh_RELEASE_TYPE PROPERTY STRINGS "stable" "HEAD")
|
||||
find_package(Git REQUIRED)
|
||||
|
||||
# Ghidra pinned stable version commit
|
||||
set(ghidra_version "11.3")
|
||||
set(ghidra_version "11.3.2")
|
||||
set(ghidra_git_tag "Ghidra_${ghidra_version}_build")
|
||||
set(ghidra_shallow TRUE)
|
||||
|
||||
@@ -52,7 +52,7 @@ if("${sleigh_RELEASE_TYPE}" STREQUAL "HEAD")
|
||||
# TODO: CMake only likes numeric characters in the version string....
|
||||
set(ghidra_head_version "11.4")
|
||||
set(ghidra_version "${ghidra_head_version}")
|
||||
set(ghidra_head_git_tag "5a3a8c36c8ec3b0f3b81c9d1b6200d5d5b521f2b")
|
||||
set(ghidra_head_git_tag "13834fabaaff919bce053616b8e24ef8ae0a756f")
|
||||
set(ghidra_git_tag "${ghidra_head_git_tag}")
|
||||
set(ghidra_shallow FALSE)
|
||||
set(ghidra_patches
|
||||
|
||||
Reference in New Issue
Block a user