(
obj: &Object,
reloc: ResolvedRelocation,
override_color: Option<HoverItemColor>,
)
| 568 | } |
| 569 | |
| 570 | pub 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 | |
| 598 | pub fn instruction_context( |
| 599 | obj: &Object, |
no test coverage detected