mirror of
https://github.com/encounter/objdiff.git
synced 2025-07-03 11:45:57 +00:00
Update line info
This commit is contained in:
parent
de744f382c
commit
e5ee898834
@ -54,6 +54,9 @@ impl ObjArch for ObjArchArm {
|
|||||||
let mut code = §ion.data
|
let mut code = §ion.data
|
||||||
[symbol.section_address as usize..(symbol.section_address + symbol.size) as usize];
|
[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 start_addr = symbol.address as u32;
|
||||||
let end_addr = start_addr + symbol.size as u32;
|
let end_addr = start_addr + symbol.size as u32;
|
||||||
|
|
||||||
@ -93,10 +96,8 @@ impl ObjArch for ObjArchArm {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
let line = obj
|
let line =
|
||||||
.line_info
|
line_info.and_then(|map| map.range(..=cur_addr as u64).last().map(|(_, &b)| b));
|
||||||
.as_ref()
|
|
||||||
.and_then(|map| map.range(..=cur_addr as u64).last().map(|(_, &b)| b));
|
|
||||||
|
|
||||||
let ins = match mapping {
|
let ins = match mapping {
|
||||||
MappingSymbol::Arm => {
|
MappingSymbol::Arm => {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user