================
@@ -109,23 +109,26 @@ ObjectFile *ObjectFileJSON::CreateMemoryInstance(const 
ModuleSP &module_sp,
 }
 
 size_t ObjectFileJSON::GetModuleSpecifications(
-    const FileSpec &file, DataBufferSP &data_sp, offset_t data_offset,
+    const FileSpec &file, DataExtractorSP &extractor_sp, offset_t data_offset,
     offset_t file_offset, offset_t length, ModuleSpecList &specs) {
-  if (!MagicBytesMatch(data_sp, data_offset, data_sp->GetByteSize()))
+  if (!MagicBytesMatch(extractor_sp->GetSharedDataBuffer(), data_offset,
----------------
bulbazord wrote:

Do you need to check the validity of extractor_sp before using it here? I see 
you do that with MachO above.

https://github.com/llvm/llvm-project/pull/178347
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to