@@ -624,19 +624,25 @@ bool SwiftLanguageRuntimeImpl::AddModuleToReflectionContext(
624
624
obj_file->GetFileSpec ().GetFilename ().GetCString ());
625
625
return false ;
626
626
}
627
- if (HasReflectionInfo (obj_file)) {
628
- // When dealing with ELF, we need to pass in the contents of the on-disk
629
- // file, since the Section Header Table is not present in the child process
630
- if (obj_file->GetPluginName ().GetStringRef ().equals (" elf" )) {
631
- DataExtractor extractor;
632
- auto size = obj_file->GetData (0 , obj_file->GetByteSize (), extractor);
633
- const uint8_t *file_data = extractor.GetDataStart ();
634
- llvm::sys::MemoryBlock file_buffer ((void *)file_data, size);
635
- m_reflection_ctx->readELF (swift::remote::RemoteAddress (load_ptr),
636
- llvm::Optional<llvm::sys::MemoryBlock>(file_buffer));
637
- } else {
638
- m_reflection_ctx->addImage (swift::remote::RemoteAddress (load_ptr));
639
- }
627
+ bool found = HasReflectionInfo (obj_file);
628
+ LLDB_LOGF (lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_TYPES),
629
+ " %s reflection metadata in \" %s\" " , found ? " Adding" : " No" ,
630
+ obj_file->GetFileSpec ().GetCString ());
631
+ if (!found)
632
+ return true ;
633
+
634
+ // When dealing with ELF, we need to pass in the contents of the on-disk
635
+ // file, since the Section Header Table is not present in the child process
636
+ if (obj_file->GetPluginName ().GetStringRef ().equals (" elf" )) {
637
+ DataExtractor extractor;
638
+ auto size = obj_file->GetData (0 , obj_file->GetByteSize (), extractor);
639
+ const uint8_t *file_data = extractor.GetDataStart ();
640
+ llvm::sys::MemoryBlock file_buffer ((void *)file_data, size);
641
+ m_reflection_ctx->readELF (
642
+ swift::remote::RemoteAddress (load_ptr),
643
+ llvm::Optional<llvm::sys::MemoryBlock>(file_buffer));
644
+ } else {
645
+ m_reflection_ctx->addImage (swift::remote::RemoteAddress (load_ptr));
640
646
}
641
647
return true ;
642
648
}
0 commit comments