1 //===-- ProcessMessage.cpp ------------------------------------------------===// 2 // 3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 4 // See https://llvm.org/LICENSE.txt for license information. 5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 6 // 7 //===----------------------------------------------------------------------===// 8 9 #include "ProcessMessage.h" 10 11 using namespace lldb_private; 12 PrintCrashReason() const13const char *ProcessMessage::PrintCrashReason() const { 14 return CrashReasonAsString(m_crash_reason); 15 } 16 PrintKind(Kind kind)17const char *ProcessMessage::PrintKind(Kind kind) { 18 const char *str = nullptr; 19 20 switch (kind) { 21 case eInvalidMessage: 22 str = "eInvalidMessage"; 23 break; 24 case eAttachMessage: 25 str = "eAttachMessage"; 26 break; 27 case eExitMessage: 28 str = "eExitMessage"; 29 break; 30 case eLimboMessage: 31 str = "eLimboMessage"; 32 break; 33 case eSignalMessage: 34 str = "eSignalMessage"; 35 break; 36 case eSignalDeliveredMessage: 37 str = "eSignalDeliveredMessage"; 38 break; 39 case eTraceMessage: 40 str = "eTraceMessage"; 41 break; 42 case eBreakpointMessage: 43 str = "eBreakpointMessage"; 44 break; 45 case eWatchpointMessage: 46 str = "eWatchpointMessage"; 47 break; 48 case eCrashMessage: 49 str = "eCrashMessage"; 50 break; 51 case eNewThreadMessage: 52 str = "eNewThreadMessage"; 53 break; 54 case eExecMessage: 55 str = "eExecMessage"; 56 break; 57 } 58 return str; 59 } 60 PrintKind() const61const char *ProcessMessage::PrintKind() const { return PrintKind(m_kind); } 62