MCPcopy Index your code
hub / github.com/encounter/objdiff / relocation_hover

Function relocation_hover

objdiff-core/src/diff/display.rs:570–596  ·  view source on GitHub ↗
(
    obj: &Object,
    reloc: ResolvedRelocation,
    override_color: Option<HoverItemColor>,
)

Source from the content-addressed store, hash-verified

568}
569
570pub fn relocation_hover(
571 obj: &Object,
572 reloc: ResolvedRelocation,
573 override_color: Option<HoverItemColor>,
574) -> Vec<HoverItem> {
575 let mut out = Vec::new();
576 if let Some(name) = obj.arch.reloc_name(reloc.relocation.flags) {
577 out.push(HoverItem::Text {
578 label: "Relocation".into(),
579 value: name.to_string(),
580 color: override_color.clone().unwrap_or_default(),
581 });
582 } else {
583 out.push(HoverItem::Text {
584 label: "Relocation".into(),
585 value: format!("<{:?}>", reloc.relocation.flags),
586 color: override_color.clone().unwrap_or_default(),
587 });
588 }
589 out.append(&mut symbol_hover(
590 obj,
591 reloc.relocation.target_symbol,
592 reloc.relocation.addend,
593 override_color,
594 ));
595 out
596}
597
598pub fn instruction_context(
599 obj: &Object,

Callers 2

data_row_hoverFunction · 0.85
instruction_hoverFunction · 0.85

Calls 3

symbol_hoverFunction · 0.85
pushMethod · 0.80
reloc_nameMethod · 0.45

Tested by

no test coverage detected