diff --git a/lldb/source/Target/TraceDumper.cpp b/lldb/source/Target/TraceDumper.cpp --- a/lldb/source/Target/TraceDumper.cpp +++ b/lldb/source/Target/TraceDumper.cpp @@ -143,7 +143,7 @@ m_s << "(error) " << *item.error; } else { m_s.Format("{0:x+16}", item.load_address); - if (item.symbol_info) { + if (item.symbol_info && item.symbol_info->instruction) { m_s << " "; item.symbol_info->instruction->Dump(&m_s, /*max_opcode_byte_size=*/0, /*show_address=*/false, @@ -213,9 +213,12 @@ m_j.attribute( "symbol", ToOptionalString(item.symbol_info->sc.GetFunctionName().AsCString())); - m_j.attribute("mnemonic", - ToOptionalString(item.symbol_info->instruction->GetMnemonic( - &item.symbol_info->exe_ctx))); + + if (item.symbol_info->instruction) { + m_j.attribute("mnemonic", + ToOptionalString(item.symbol_info->instruction->GetMnemonic( + &item.symbol_info->exe_ctx))); + } if (IsLineEntryValid(item.symbol_info->sc.line_entry)) { m_j.attribute(