mirror of https://github.com/encounter/objdiff.git
Fix PPC branch display; update README.md
This commit is contained in:
parent
30d14870ef
commit
106652ae7d
|
@ -7,7 +7,7 @@ A local diffing tool for decompilation projects. Inspired by [decomp.me](https:/
|
|||
|
||||
Features:
|
||||
- Compare entire object files: functions and data.
|
||||
- Built-in symbol demangling for C++.
|
||||
- Built-in symbol demangling for C++. (CodeWarrior, Itanium & MSVC)
|
||||
- Automatic rebuild on source file changes.
|
||||
- Project integration via [configuration file](#configuration).
|
||||
- Search and filter all of a project's objects and quickly switch.
|
||||
|
@ -15,7 +15,8 @@ Features:
|
|||
|
||||
Supports:
|
||||
- PowerPC 750CL (GameCube & Wii)
|
||||
- MIPS (Nintendo 64)
|
||||
- MIPS (Nintendo 64 & PS2)
|
||||
- x86 (PE only at the moment)
|
||||
|
||||
See [Usage](#usage) for more information.
|
||||
|
||||
|
|
|
@ -89,9 +89,7 @@ pub fn run(args: Args) -> Result<()> {
|
|||
return Some(obj);
|
||||
}
|
||||
|
||||
let Some(up) = unit_path.as_deref() else {
|
||||
return None;
|
||||
};
|
||||
let up = unit_path.as_deref()?;
|
||||
|
||||
resolve_paths(obj);
|
||||
|
||||
|
|
|
@ -74,7 +74,11 @@ pub fn display_diff<E>(
|
|||
display_reloc_name(ins.reloc.as_ref().unwrap(), &mut cb)?;
|
||||
}
|
||||
ObjInsArg::BranchDest(dest) => {
|
||||
cb(DiffText::BranchDest(*dest))?;
|
||||
if let Some(dest) = dest.checked_sub(base_addr) {
|
||||
cb(DiffText::BranchDest(dest))?;
|
||||
} else {
|
||||
cb(DiffText::Basic("<unknown>"))?;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -23,10 +23,14 @@ pub enum X86Formatter {
|
|||
Masm,
|
||||
}
|
||||
|
||||
#[inline]
|
||||
const fn default_true() -> bool { true }
|
||||
|
||||
#[derive(Debug, Clone, Default, Eq, PartialEq, serde::Deserialize, serde::Serialize)]
|
||||
#[serde(default)]
|
||||
pub struct DiffObjConfig {
|
||||
pub relax_reloc_diffs: bool,
|
||||
#[serde(default = "default_true")]
|
||||
pub space_between_args: bool,
|
||||
pub x86_formatter: X86Formatter,
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue