1 //===-- ProcessMessage.cpp --------------------------------------*- C++ -*-===//
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
7 //===----------------------------------------------------------------------===//
9 #include "ProcessMessage.h"
11 using namespace lldb_private;
13 const char *ProcessMessage::PrintCrashReason() const {
14 return CrashReasonAsString(m_crash_reason);
17 const char *ProcessMessage::PrintKind(Kind kind) {
18 #ifdef LLDB_CONFIGURATION_BUILDANDINTEGRATION
19 // Just return the code in ascii for integration builds.
21 sprintf(str, "%d", reason);
23 const char *str = nullptr;
27 str = "eInvalidMessage";
30 str = "eAttachMessage";
36 str = "eLimboMessage";
39 str = "eSignalMessage";
41 case eSignalDeliveredMessage:
42 str = "eSignalDeliveredMessage";
45 str = "eTraceMessage";
47 case eBreakpointMessage:
48 str = "eBreakpointMessage";
50 case eWatchpointMessage:
51 str = "eWatchpointMessage";
54 str = "eCrashMessage";
56 case eNewThreadMessage:
57 str = "eNewThreadMessage";
68 const char *ProcessMessage::PrintKind() const { return PrintKind(m_kind); }