(
compilation: &mut Compilation<'_>,
module: StaticModuleIndex,
unit: &mut write::ConvertUnit<'_, Reader<'a>>,
root_entry: &write::ConvertUnitEntry<Reader<'a>>,
skeleton_root_entry
| 259 | } |
| 260 | |
| 261 | pub(crate) fn clone_unit<'a>( |
| 262 | compilation: &mut Compilation<'_>, |
| 263 | module: StaticModuleIndex, |
| 264 | unit: &mut write::ConvertUnit<'_, Reader<'a>>, |
| 265 | root_entry: &write::ConvertUnitEntry<Reader<'a>>, |
| 266 | skeleton_root_entry: Option<&write::ConvertUnitEntry<Reader<'a>>>, |
| 267 | addr_tr: &AddressTransform, |
| 268 | out_module_synthetic_unit: &ModuleSyntheticUnit, |
| 269 | translated: &mut HashSet<usize>, |
| 270 | isa: &dyn TargetIsa, |
| 271 | ) -> Result<(), Error> { |
| 272 | let mut current_frame_base = InheritedAttr::new(); |
| 273 | let mut current_value_range = InheritedAttr::new(); |
| 274 | let mut current_scope_ranges = InheritedAttr::new(); |
| 275 | let mut current_subprogram = InheritedAttr::new(); |
| 276 | |
| 277 | dbi_log!("Cloning CU {:?}", log_get_cu_summary(unit.read_unit)); |
| 278 | |
| 279 | if let Some(convert_program) = unit.read_line_program(Some(unit.unit.encoding()), None)? { |
| 280 | let (program, files) = clone_line_program(convert_program, addr_tr)?; |
| 281 | unit.set_line_program(program, files); |
| 282 | } |
| 283 | |
| 284 | if root_entry.tag == gimli::DW_TAG_compile_unit { |
| 285 | log_begin_input_die(root_entry); |
| 286 | |
| 287 | let out_root_id = unit.unit.root(); |
| 288 | clone_die_attributes( |
| 289 | unit, |
| 290 | root_entry, |
| 291 | addr_tr, |
| 292 | None, |
| 293 | out_root_id, |
| 294 | None, |
| 295 | None, |
| 296 | EntryAttributesContext { |
| 297 | subprograms: &mut current_subprogram, |
| 298 | frame_base: None, |
| 299 | }, |
| 300 | isa, |
| 301 | )?; |
| 302 | |
| 303 | if let Some(skeleton_root_entry) = skeleton_root_entry { |
| 304 | clone_die_attributes( |
| 305 | unit, |
| 306 | skeleton_root_entry, |
| 307 | addr_tr, |
| 308 | None, |
| 309 | out_root_id, |
| 310 | None, |
| 311 | None, |
| 312 | EntryAttributesContext { |
| 313 | subprograms: &mut current_subprogram, |
| 314 | frame_base: None, |
| 315 | }, |
| 316 | isa, |
| 317 | )?; |
| 318 | } |
no test coverage detected