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

Function data_row_context

objdiff-core/src/diff/display.rs:551–568  ·  view source on GitHub ↗
(obj: &Object, diff_row: &DataDiffRow)

Source from the content-addressed store, hash-verified

549}
550
551pub fn data_row_context(obj: &Object, diff_row: &DataDiffRow) -> Vec<ContextItem> {
552 let mut out = Vec::new();
553 let mut prev_reloc = None;
554 for reloc_diff in diff_row.relocations.iter() {
555 let reloc = &reloc_diff.reloc;
556 if prev_reloc == Some(reloc) {
557 // Avoid showing consecutive duplicate relocations.
558 // We do this because a single relocation can span across multiple diffs if the
559 // bytes in the relocation changed (e.g. first byte is added, second is unchanged).
560 continue;
561 }
562 prev_reloc = Some(reloc);
563
564 let reloc = resolve_relocation(&obj.symbols, reloc);
565 out.append(&mut relocation_context(obj, reloc, None, None));
566 }
567 out
568}
569
570pub fn relocation_hover(
571 obj: &Object,

Callers 2

data_contextMethod · 0.85
data_row_context_menuFunction · 0.85

Calls 2

resolve_relocationFunction · 0.85
relocation_contextFunction · 0.85

Tested by

no test coverage detected