mirror of
https://github.com/encounter/objdiff.git
synced 2026-07-10 12:18:36 -07:00
Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 83de98b5ee | |||
| c1ba4e91d1 | |||
| 575900024d | |||
| cbe299e859 |
@@ -142,7 +142,11 @@ jobs:
|
||||
uses: actions/checkout@v4
|
||||
- name: Install cargo-zigbuild
|
||||
if: matrix.build == 'zigbuild'
|
||||
run: pip install ziglang==0.13.0 cargo-zigbuild==0.19.1
|
||||
run: |
|
||||
python3 -m venv .venv
|
||||
. .venv/bin/activate
|
||||
echo PATH=$PATH >> $GITHUB_ENV
|
||||
pip install ziglang==0.13.0 cargo-zigbuild==0.19.1
|
||||
- name: Setup Rust toolchain
|
||||
uses: dtolnay/rust-toolchain@stable
|
||||
with:
|
||||
|
||||
Generated
+3
-3
@@ -2861,7 +2861,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "objdiff-cli"
|
||||
version = "2.3.0"
|
||||
version = "2.3.1"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"argp",
|
||||
@@ -2883,7 +2883,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "objdiff-core"
|
||||
version = "2.3.0"
|
||||
version = "2.3.1"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"arm-attr",
|
||||
@@ -2923,7 +2923,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "objdiff-gui"
|
||||
version = "2.3.0"
|
||||
version = "2.3.1"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"bytes",
|
||||
|
||||
+1
-1
@@ -13,7 +13,7 @@ strip = "debuginfo"
|
||||
codegen-units = 1
|
||||
|
||||
[workspace.package]
|
||||
version = "2.3.0"
|
||||
version = "2.3.1"
|
||||
authors = ["Luke Street <luke@street.dev>"]
|
||||
edition = "2021"
|
||||
license = "MIT OR Apache-2.0"
|
||||
|
||||
@@ -182,14 +182,14 @@ fn symbols_by_section(
|
||||
result.sort_by(|a, b| a.address.cmp(&b.address).then(a.size.cmp(&b.size)));
|
||||
let mut iter = result.iter_mut().peekable();
|
||||
while let Some(symbol) = iter.next() {
|
||||
if symbol.kind == ObjSymbolKind::Unknown && symbol.size == 0 {
|
||||
if symbol.size == 0 {
|
||||
if let Some(next_symbol) = iter.peek() {
|
||||
symbol.size = next_symbol.address - symbol.address;
|
||||
} else {
|
||||
symbol.size = (section.address + section.size) - symbol.address;
|
||||
}
|
||||
// Set symbol kind if we ended up with a non-zero size
|
||||
if symbol.size > 0 {
|
||||
if symbol.kind == ObjSymbolKind::Unknown && symbol.size > 0 {
|
||||
symbol.kind = match section.kind {
|
||||
ObjSectionKind::Code => ObjSymbolKind::Function,
|
||||
ObjSectionKind::Data | ObjSectionKind::Bss => ObjSymbolKind::Object,
|
||||
|
||||
+17
-7
@@ -267,15 +267,25 @@ impl AppState {
|
||||
}
|
||||
|
||||
pub fn set_selected_obj(&mut self, config: ObjectConfig) {
|
||||
if self.config.selected_obj.as_ref().is_some_and(|existing| existing == &config) {
|
||||
// Don't reload the object if there were no changes
|
||||
return;
|
||||
let mut unit_changed = true;
|
||||
if let Some(existing) = self.config.selected_obj.as_ref() {
|
||||
if existing == &config {
|
||||
// Don't reload the object if there were no changes
|
||||
return;
|
||||
}
|
||||
if existing.name == config.name {
|
||||
unit_changed = false;
|
||||
}
|
||||
}
|
||||
self.config.selected_obj = Some(config);
|
||||
self.obj_change = true;
|
||||
self.queue_build = false;
|
||||
self.selecting_left = None;
|
||||
self.selecting_right = None;
|
||||
if unit_changed {
|
||||
self.obj_change = true;
|
||||
self.queue_build = false;
|
||||
self.selecting_left = None;
|
||||
self.selecting_right = None;
|
||||
} else {
|
||||
self.queue_build = true;
|
||||
}
|
||||
}
|
||||
|
||||
pub fn clear_selected_obj(&mut self) {
|
||||
|
||||
Reference in New Issue
Block a user