Skip to content

Commit

Permalink
Merge dev changes (#31)
Browse files Browse the repository at this point in the history
* Target newer z3, fmt, clippy

* Remove reference

* Add catch for sleigh size mismatch

* Fix condition

* fmt

* Initial context work

* Add context; will slowly move stuff over to using this instead

* Add derives

* Pub z3

* cargo fmt

* Ditch cargo lock

* Update ci

* Remove registers from context for now
until link issues are fixed

* Relax context requirement

* Add state equality helper

* Bump z3

* Store language id in sleigh context

* Update image section debug

* Oops

* Actually run cargo check this time; comment out thing I didn't finish writing

* Try section flags instead of segment flags

* Add bb-read

* Only load executable sections into ghidra for now

* Only load executable sections into ghidra for now

* Try bumping to ghidra 11.1

* Update how loading is done for ghidra 11.1

* Fix get_registers()

* Update test

* Add section parsing log

* Fmt

* Show range instead

* Kludgy try_from impl, silencing warnings, fmt, clippy

* Clone if there's only one

* impl (Partial)Eq for Instruction

* Derive ParitalEq/Eq so that I can derive Hash soundly

* Readme tweak

* Remove unnecessary compile API now that Ghidraships with precompiled sla.
Also added a new bin target for jingle

* Initial CLI

* cargo fmt

* Basic bin functionality

* Add readme note and two missing operations

* Simplify printed model

* Sleigh parsing tweaks

* Update logo

* Gimli change

* Block tweak

* Add input enumeration

* Add constraint

* Explicitly add pointer dependencies to input call

* Add arch and fmt

* Initial context stuff

* Fixed up C++ build side, now to fix FFI

* Fix stuff and fmt. Builds, but need to make sure it actually works

* Need to fix tests now

* Some small tweaks

* Gitignore, heap-allocate some stuff

* Tweaks

* Move back to storing all images directly in context

* Add test

* Bump ghidra to 11.2

* Fix jingle build

* Fix jingle binary build

* Fixes context variables

* Re-add image

* Add initialize call

* Some bounds checking fixes

* Move pcode/assembly emitters into their own files

* Add test

* Change get_reg impl for now

* Add wrapper to ensure an image is loaded before parsing

* Fmt

* Clippy

* More clippy

* Fix jingle

* fmt

* Clippy

* Fix binary

* Don't consume varnode in `get_register_name`

* Initial trait work

* Tweaks

* Some build fixes

* More stuff

* Maybe just need to add the impls now?

* Build fixed

* fmt

* Clippy

* Actually fix build

* Fix crashes

* Start on gimli

* Impl gimli

* actually actually fix build

* Fmt and gimli tweak

* Remove unused file

* Remove more unused files

* Fix build

* clippy --fix

* Clippy fixes

* Changes to traits

* fmt

* Clippy

* pub perms

* More trait stuff

* Convert LoadedSleighContext to struct

* Trying more stuff

* More trait gymnastics

* Clippy

* Remove unused generic bounds

* Add owned file

* Pub all of gimli

* Reshuffle

* Filter

* Fix loading

* Display register names

* Change display impl

* fmt

* clippy

* fmt

* Name tweak

* Add read_bytes

* cherrypick get_bytes

* Add helper to summarize branches

* Update logo

* Update jingle.svg

* Made ImageSectionIterator::new pub

This would allow users to implement ImageProvider trait for their datatypes

* Target master branch of z3.rs

* Add rebasing API

* Fix rebasing API

* Context refactor

* Fix formatting

* fmt

* Clippy

* Only expose image bytes in the code space

* Blanket impl for ImageProvider

* Fmt

* Fix spaces

* Bundle Zlib (#23)

* Experiment with bundling zlib

* Check if testing works in CI

* Suppress warnings

* Revert workflow change

* Re-add all-features

* Multiplatform CI (#24)

* Enforce Fmt and Lint in CI
* Build jingle_sleigh on linux, macos, and windows
* Build jingle on linux

* Fix ldefs (#26)

* fix ldef

* return error if there are not ldefs

* fix clippy

---------

Co-authored-by: daniele.linguaglossa <[email protected]>

* Additional CI refactor (#28)

* Steal dtolnay's CI configuration

* Add deflate.c to compilation (#29)

* Build tweak (#30)

* Fix exception warning, reorganize build rs paths

* Add zconf for windows build

* Re-add flag

* Needed more trees I guess

* Left shift tweak

* Remove unnecessary pin. Add favicon.svg.

* Some CLI stuff

* Fix and fmt

* Clippy fix

---------

Co-authored-by: chf0x <[email protected]>
Co-authored-by: Daniele Linguaglossa <[email protected]>
Co-authored-by: daniele.linguaglossa <[email protected]>
  • Loading branch information
4 people authored Jan 24, 2025
1 parent a17d75c commit b2cc43a
Show file tree
Hide file tree
Showing 68 changed files with 2,752 additions and 1,863 deletions.
13 changes: 0 additions & 13 deletions .github/workflows/check.yml

This file was deleted.

32 changes: 32 additions & 0 deletions .github/workflows/jingle.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: jingle

on:
push:
pull_request:
workflow_dispatch:

jobs:
pre_ci:
uses: dtolnay/.github/.github/workflows/pre_ci.yml@master

build:
name: ${{matrix.name || format('Rust {0}', matrix.rust)}}
needs: pre_ci
if: needs.pre_ci.outputs.continue
runs-on: ${{matrix.os}}-latest
strategy:
fail-fast: false
matrix:
rust: [nightly, beta, stable]
os: [ubuntu]
env:
RUSTFLAGS: --cfg deny_warnings -Dwarnings
timeout-minutes: 45
steps:
- uses: actions/checkout@v4
with:
submodules: true
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{matrix.rust}}
- run: cargo build --all-features --manifest-path jingle_sleigh/Cargo.toml
45 changes: 45 additions & 0 deletions .github/workflows/jingle_sleigh.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: jingle_sleigh

# Stealing the multi-platform CI configuration from
# https://github.com/dtolnay/cxx/blob/master/.github/workflows/ci.yml
# for testing build using CXX.

on:
push:
pull_request:
workflow_dispatch:

jobs:
pre_ci:
uses: dtolnay/.github/.github/workflows/pre_ci.yml@master

build:
name: ${{matrix.name || format('Rust {0}', matrix.rust)}}
needs: pre_ci
if: needs.pre_ci.outputs.continue
runs-on: ${{matrix.os}}-latest
strategy:
fail-fast: false
matrix:
rust: [nightly, stable]
os: [ubuntu]
include:
- name: Cargo on macOS
rust: nightly
os: macos
- name: Cargo on Windows (msvc)
rust: nightly-x86_64-pc-windows-msvc
os: windows
flags: /EHsc
env:
CXXFLAGS: ${{matrix.flags}}
RUSTFLAGS: --cfg deny_warnings -Dwarnings
timeout-minutes: 45
steps:
- uses: actions/checkout@v4
with:
submodules: true
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{matrix.rust}}
- run: cargo build --all-features --manifest-path jingle_sleigh/Cargo.toml
36 changes: 36 additions & 0 deletions .github/workflows/style.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Style

on:
push:
pull_request:
workflow_dispatch:

jobs:
pre_ci:
uses: dtolnay/.github/.github/workflows/pre_ci.yml@master

build:
name: ${{matrix.name || format('Rust {0}', matrix.rust)}}
needs: pre_ci
if: needs.pre_ci.outputs.continue
runs-on: ${{matrix.os}}-latest
strategy:
fail-fast: false
matrix:
rust: [ stable ]
os: [ ubuntu ]
env:
RUSTFLAGS: --cfg deny_warnings -Dwarnings
timeout-minutes: 45
steps:
- uses: actions/checkout@v4
with:
submodules: true
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{matrix.rust}}
components: clippy, rustfmt
- name: cargo fmt
run: cargo fmt --all -- --check
- name: cargo clippy
run: cargo clippy --all-targets --all-features -- -D warnings
Loading

0 comments on commit b2cc43a

Please sign in to comment.