mirror of
https://github.com/encounter/objdiff.git
synced 2025-12-09 13:37:55 +00:00
PPC: Guess reloc data type based on the instruction. (#108)
* Guess reloc data type based on the instruction. Adds an entry to the reloc tooltip to show the inferred data type and value. * Fix clippy warning * Match on Opcode rather than mnemonic string
This commit is contained in:
@@ -79,6 +79,12 @@ fn ins_hover_ui(
|
||||
appearance.highlight_color,
|
||||
format!("Size: {:x}", reloc.target.size),
|
||||
);
|
||||
if let Some(s) = arch
|
||||
.guess_data_type(ins)
|
||||
.and_then(|ty| arch.display_data_type(ty, &reloc.target.bytes))
|
||||
{
|
||||
ui.colored_label(appearance.highlight_color, s);
|
||||
}
|
||||
} else {
|
||||
ui.colored_label(appearance.highlight_color, "Extern".to_string());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user