1*0b57cec5SDimitry Andric //===-- InstrumentationRuntimeStopInfo.cpp --------------------------------===//
2*0b57cec5SDimitry Andric //
3*0b57cec5SDimitry Andric // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4*0b57cec5SDimitry Andric // See https://llvm.org/LICENSE.txt for license information.
5*0b57cec5SDimitry Andric // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6*0b57cec5SDimitry Andric //
7*0b57cec5SDimitry Andric //===----------------------------------------------------------------------===//
8*0b57cec5SDimitry Andric
9*0b57cec5SDimitry Andric #include "lldb/Target/InstrumentationRuntimeStopInfo.h"
10*0b57cec5SDimitry Andric
11*0b57cec5SDimitry Andric #include "lldb/Target/InstrumentationRuntime.h"
12*0b57cec5SDimitry Andric #include "lldb/Target/Process.h"
13*0b57cec5SDimitry Andric #include "lldb/lldb-private.h"
14*0b57cec5SDimitry Andric
15*0b57cec5SDimitry Andric using namespace lldb;
16*0b57cec5SDimitry Andric using namespace lldb_private;
17*0b57cec5SDimitry Andric
InstrumentationRuntimeStopInfo(Thread & thread,std::string description,StructuredData::ObjectSP additional_data)18*0b57cec5SDimitry Andric InstrumentationRuntimeStopInfo::InstrumentationRuntimeStopInfo(
19*0b57cec5SDimitry Andric Thread &thread, std::string description,
20*0b57cec5SDimitry Andric StructuredData::ObjectSP additional_data)
21*0b57cec5SDimitry Andric : StopInfo(thread, 0) {
22*0b57cec5SDimitry Andric m_extended_info = additional_data;
23*0b57cec5SDimitry Andric m_description = description;
24*0b57cec5SDimitry Andric }
25*0b57cec5SDimitry Andric
GetDescription()26*0b57cec5SDimitry Andric const char *InstrumentationRuntimeStopInfo::GetDescription() {
27*0b57cec5SDimitry Andric return m_description.c_str();
28*0b57cec5SDimitry Andric }
29*0b57cec5SDimitry Andric
30*0b57cec5SDimitry Andric StopInfoSP
CreateStopReasonWithInstrumentationData(Thread & thread,std::string description,StructuredData::ObjectSP additionalData)31*0b57cec5SDimitry Andric InstrumentationRuntimeStopInfo::CreateStopReasonWithInstrumentationData(
32*0b57cec5SDimitry Andric Thread &thread, std::string description,
33*0b57cec5SDimitry Andric StructuredData::ObjectSP additionalData) {
34*0b57cec5SDimitry Andric return StopInfoSP(
35*0b57cec5SDimitry Andric new InstrumentationRuntimeStopInfo(thread, description, additionalData));
36*0b57cec5SDimitry Andric }
37