1ac7ddfbfSEd Maste //===-- ProcessMessage.cpp --------------------------------------*- C++ -*-===// 2ac7ddfbfSEd Maste // 3ac7ddfbfSEd Maste // The LLVM Compiler Infrastructure 4ac7ddfbfSEd Maste // 5ac7ddfbfSEd Maste // This file is distributed under the University of Illinois Open Source 6ac7ddfbfSEd Maste // License. See LICENSE.TXT for details. 7ac7ddfbfSEd Maste // 8ac7ddfbfSEd Maste //===----------------------------------------------------------------------===// 9ac7ddfbfSEd Maste 10ac7ddfbfSEd Maste #include "ProcessMessage.h" 11ac7ddfbfSEd Maste 12ac7ddfbfSEd Maste using namespace lldb_private; 13ac7ddfbfSEd Maste PrintCrashReason() const14*435933ddSDimitry Andricconst char *ProcessMessage::PrintCrashReason() const { 151c3bbb01SEd Maste return CrashReasonAsString(m_crash_reason); 16ac7ddfbfSEd Maste } 17ac7ddfbfSEd Maste PrintKind(Kind kind)18*435933ddSDimitry Andricconst char *ProcessMessage::PrintKind(Kind kind) { 19ac7ddfbfSEd Maste #ifdef LLDB_CONFIGURATION_BUILDANDINTEGRATION 201c3bbb01SEd Maste // Just return the code in ascii for integration builds. 21ac7ddfbfSEd Maste chcar str[8]; 22ac7ddfbfSEd Maste sprintf(str, "%d", reason); 23ac7ddfbfSEd Maste #else 24ac7ddfbfSEd Maste const char *str = NULL; 25ac7ddfbfSEd Maste 26*435933ddSDimitry Andric switch (kind) { 27ac7ddfbfSEd Maste case eInvalidMessage: 28ac7ddfbfSEd Maste str = "eInvalidMessage"; 29ac7ddfbfSEd Maste break; 3035617911SEd Maste case eAttachMessage: 3135617911SEd Maste str = "eAttachMessage"; 3235617911SEd Maste break; 33ac7ddfbfSEd Maste case eExitMessage: 34ac7ddfbfSEd Maste str = "eExitMessage"; 35ac7ddfbfSEd Maste break; 36ac7ddfbfSEd Maste case eLimboMessage: 37ac7ddfbfSEd Maste str = "eLimboMessage"; 38ac7ddfbfSEd Maste break; 39ac7ddfbfSEd Maste case eSignalMessage: 40ac7ddfbfSEd Maste str = "eSignalMessage"; 41ac7ddfbfSEd Maste break; 42ac7ddfbfSEd Maste case eSignalDeliveredMessage: 43ac7ddfbfSEd Maste str = "eSignalDeliveredMessage"; 44ac7ddfbfSEd Maste break; 45ac7ddfbfSEd Maste case eTraceMessage: 46ac7ddfbfSEd Maste str = "eTraceMessage"; 47ac7ddfbfSEd Maste break; 48ac7ddfbfSEd Maste case eBreakpointMessage: 49ac7ddfbfSEd Maste str = "eBreakpointMessage"; 50ac7ddfbfSEd Maste break; 51ac7ddfbfSEd Maste case eWatchpointMessage: 52ac7ddfbfSEd Maste str = "eWatchpointMessage"; 53ac7ddfbfSEd Maste break; 54ac7ddfbfSEd Maste case eCrashMessage: 55ac7ddfbfSEd Maste str = "eCrashMessage"; 56ac7ddfbfSEd Maste break; 57ac7ddfbfSEd Maste case eNewThreadMessage: 58ac7ddfbfSEd Maste str = "eNewThreadMessage"; 59ac7ddfbfSEd Maste break; 6035617911SEd Maste case eExecMessage: 6135617911SEd Maste str = "eExecMessage"; 6235617911SEd Maste break; 63ac7ddfbfSEd Maste } 64ac7ddfbfSEd Maste #endif 65ac7ddfbfSEd Maste 66ac7ddfbfSEd Maste return str; 67ac7ddfbfSEd Maste } 68ac7ddfbfSEd Maste PrintKind() const69*435933ddSDimitry Andricconst char *ProcessMessage::PrintKind() const { return PrintKind(m_kind); } 70