(
debug_info: &mut DebugInfo,
bv: &BinaryView,
debug_file: &BinaryView,
progress: Box<dyn Fn(usize, usize) -> Result<(), ()>>,
)
| 106 | } |
| 107 | |
| 108 | fn parse_idb_info( |
| 109 | debug_info: &mut DebugInfo, |
| 110 | bv: &BinaryView, |
| 111 | debug_file: &BinaryView, |
| 112 | progress: Box<dyn Fn(usize, usize) -> Result<(), ()>>, |
| 113 | ) -> Result<()> { |
| 114 | trace!("Opening a IDB file"); |
| 115 | let file = BinaryViewReader { |
| 116 | bv: debug_file, |
| 117 | offset: 0, |
| 118 | }; |
| 119 | trace!("Parsing a IDB file"); |
| 120 | let file = std::io::BufReader::new(file); |
| 121 | let mut parser = idb_rs::IDBParser::new(file)?; |
| 122 | if let Some(til_section) = parser.til_section_offset() { |
| 123 | trace!("Parsing the TIL section"); |
| 124 | let til = parser.read_til_section(til_section)?; |
| 125 | // progress 0%-50% |
| 126 | import_til_section(debug_info, debug_file, &til, progress)?; |
| 127 | } |
| 128 | |
| 129 | if let Some(id0_section) = parser.id0_section_offset() { |
| 130 | trace!("Parsing the ID0 section"); |
| 131 | let id0 = parser.read_id0_section(id0_section)?; |
| 132 | // progress 50%-100% |
| 133 | parse_id0_section_info(debug_info, bv, debug_file, &id0)?; |
| 134 | } |
| 135 | |
| 136 | Ok(()) |
| 137 | } |
| 138 | |
| 139 | fn parse_til_info( |
| 140 | debug_info: &mut DebugInfo, |
no test coverage detected