MCPcopy Index your code
hub / github.com/encounter/objdiff / parse_line_info

Function parse_line_info

objdiff-core/src/obj/read.rs:702–731  ·  view source on GitHub ↗
(
    obj_file: &object::File,
    sections: &mut [Section],
    section_indices: &[usize],
    obj_data: &[u8],
)

Source from the content-addressed store, hash-verified

700}
701
702fn 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.
734fn parse_line_info_dwarf1(obj_file: &object::File, sections: &mut [Section]) -> Result<()> {

Callers 1

parseFunction · 0.85

Calls 4

parse_line_info_dwarf1Function · 0.85
parse_line_info_dwarf2Function · 0.85
parse_line_info_coffFunction · 0.85
parse_line_info_mdebugFunction · 0.85

Tested by

no test coverage detected