(
obj_file: &object::File,
sections: &mut [Section],
section_indices: &[usize],
obj_data: &[u8],
)
| 700 | } |
| 701 | |
| 702 | fn parse_line_info( |
| 703 | obj_file: &object::File, |
| 704 | sections: &mut [Section], |
| 705 | section_indices: &[usize], |
| 706 | obj_data: &[u8], |
| 707 | ) -> Result<()> { |
| 708 | // DWARF 1.1 |
| 709 | if let Err(e) = parse_line_info_dwarf1(obj_file, sections) { |
| 710 | log::warn!("Failed to parse DWARF 1.1 line info: {e}"); |
| 711 | } |
| 712 | |
| 713 | // DWARF 2+ |
| 714 | #[cfg(feature = "dwarf")] |
| 715 | if let Err(e) = super::dwarf2::parse_line_info_dwarf2(obj_file, sections) { |
| 716 | log::warn!("Failed to parse DWARF 2+ line info: {e}"); |
| 717 | } |
| 718 | |
| 719 | // COFF |
| 720 | if let object::File::Coff(coff) = obj_file |
| 721 | && let Err(e) = parse_line_info_coff(coff, sections, section_indices, obj_data) |
| 722 | { |
| 723 | log::warn!("Failed to parse COFF line info: {e}"); |
| 724 | } |
| 725 | |
| 726 | if let Err(e) = super::mdebug::parse_line_info_mdebug(obj_file, sections) { |
| 727 | log::warn!("Failed to parse MIPS mdebug line info: {e}"); |
| 728 | } |
| 729 | |
| 730 | Ok(()) |
| 731 | } |
| 732 | |
| 733 | /// Parse .line section from DWARF 1.1 format. |
| 734 | fn parse_line_info_dwarf1(obj_file: &object::File, sections: &mut [Section]) -> Result<()> { |
no test coverage detected