@@ -355,28 +355,12 @@ DataExtractor ProcessMinidump::GetAuxvData() {
355355}
356356
357357bool ProcessMinidump::IsLLDBMinidump () {
358- // If we've already checked, return the cached value
359- if (m_is_lldb_generated.has_value ())
360- return *m_is_lldb_generated;
361-
362- // If the minidump doesn't have a LLDBGeneratedStream, it's not an LLDB
363- // We also check to see if the section was generated correctly, but not
364- // enforcing an exact size so we can change it in the future without
365- // impacting older generated Minidumps.
366- llvm::ArrayRef<uint8_t > lldbStream =
367- m_minidump_parser->GetStream (StreamType::LLDBGenerated);
368- if (lldbStream.empty () || lldbStream.size () <= sizeof (StreamType)) {
369- m_is_lldb_generated = false ;
370- return false ;
371- }
372-
373- const uint32_t *lldbStreamType =
374- reinterpret_cast <const uint32_t *>(lldbStream.data ());
375-
376- m_is_lldb_generated = *lldbStreamType == (uint32_t )StreamType::LLDBGenerated;
377- return *m_is_lldb_generated;
358+ std::optional<llvm::ArrayRef<uint8_t >> lldb_generated_section =
359+ m_minidump_parser->GetRawStream (StreamType::LLDBGenerated);
360+ return lldb_generated_section.has_value ();
378361}
379362
363+
380364DynamicLoader *ProcessMinidump::GetDynamicLoader () {
381365 // This is a workaround for the dynamic loader not playing nice in issue
382366 // #119598. The specific reason we use the dynamic loader is to get the TLS
0 commit comments