================
@@ -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,
+ extractor_sp->GetByteSize()))
return 0;
// Update the data to contain the entire file if it doesn't already.
- if (data_sp->GetByteSize() < length) {
- data_sp = MapFileData(file, length, file_offset);
- if (!data_sp)
+ if (extractor_sp->GetByteSize() < length) {
+ DataBufferSP file_data_sp = MapFileData(file, length, file_offset);
+ if (file_data_sp)
+ extractor_sp->SetData(file_data_sp);
----------------
JDevlieghere wrote:
```suggestion
if (DataBufferSP file_data_sp = MapFileData(file, length, file_offset))
extractor_sp->SetData(file_data_sp);
```
https://github.com/llvm/llvm-project/pull/178347
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits