Update line info

This commit is contained in:
Aetias 2024-05-20 20:52:59 +02:00
parent de744f382c
commit e5ee898834

View File

@ -54,6 +54,9 @@ impl ObjArch for ObjArchArm {
let mut code = &section.data
[symbol.section_address as usize..(symbol.section_address + symbol.size) as usize];
let line_info =
obj.line_info.as_ref().and_then(|map| map.get(&SectionIndex(section.orig_index)));
let start_addr = symbol.address as u32;
let end_addr = start_addr + symbol.size as u32;
@ -93,10 +96,8 @@ impl ObjArch for ObjArchArm {
break;
}
let line = obj
.line_info
.as_ref()
.and_then(|map| map.range(..=cur_addr as u64).last().map(|(_, &b)| b));
let line =
line_info.and_then(|map| map.range(..=cur_addr as u64).last().map(|(_, &b)| b));
let ins = match mapping {
MappingSymbol::Arm => {