MCPcopy Create free account
hub / github.com/encounter/objdiff / assign_lines

Function assign_lines

objdiff-core/src/obj/mdebug.rs:159–169  ·  view source on GitHub ↗
(sections: &mut [Section], base_address: u64, lines: &[i32])

Source from the content-addressed store, hash-verified

157}
158
159fn assign_lines(sections: &mut [Section], base_address: u64, lines: &[i32]) {
160 let mut address = base_address;
161 for &line in lines {
162 if line >= 0
163 && let Some(section) = find_code_section(sections, address)
164 {
165 section.line_info.insert(address, line as u32);
166 }
167 address = address.wrapping_add(4);
168 }
169}
170
171fn find_code_section(sections: &mut [Section], address: u64) -> Option<&mut Section> {
172 sections.iter_mut().find(|section| {

Callers 1

parse_line_info_mdebugFunction · 0.85

Calls 1

find_code_sectionFunction · 0.85

Tested by

no test coverage detected