mirror of
https://github.com/encounter/objdiff.git
synced 2026-07-10 12:18:36 -07:00
Make the .mdebug line parser support EE-GCC (PS2) (#362)
This commit is contained in:
@@ -102,3 +102,28 @@ fn mwcc_dwarf1_line_numbers_multiple_functions() {
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(feature = "mips")]
|
||||
fn ee_gcc_mdebug_line_numbers() {
|
||||
let diff_config = diff::DiffObjConfig::default();
|
||||
let obj = obj::read::parse(
|
||||
include_object!("data/mips/ee_gcc_lines_example.o"),
|
||||
&diff_config,
|
||||
diff::DiffSide::Base,
|
||||
)
|
||||
.unwrap();
|
||||
|
||||
let text_section = obj.sections.iter().find(|s| s.name == ".text").unwrap();
|
||||
assert_eq!(text_section.line_info.get(&0), Some(&1));
|
||||
assert_eq!(text_section.line_info.get(&12), Some(&2));
|
||||
assert_eq!(text_section.line_info.get(&20), Some(&4));
|
||||
assert_eq!(text_section.line_info.get(&40), Some(&5));
|
||||
assert_eq!(text_section.line_info.get(&64), Some(&7));
|
||||
assert_eq!(text_section.line_info.get(&80), Some(&8));
|
||||
assert_eq!(text_section.line_info.get(&88), Some(&10));
|
||||
assert_eq!(text_section.line_info.get(&96), Some(&11));
|
||||
assert_eq!(text_section.line_info.get(&104), Some(&12));
|
||||
assert_eq!(text_section.line_info.get(&144), Some(&13));
|
||||
assert_eq!(text_section.line_info.len(), 10);
|
||||
}
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user