blob: f2767ffbff0d9ea288bcb066b0e37b3a3a47a088 [file] [log] [blame]
Kuba Breckaafdf8422014-10-10 23:43:03 +00001//===-- InstrumentationRuntimeStopInfo.cpp ----------------------*- C++ -*-===//
2//
Chandler Carruth2946cd72019-01-19 08:50:56 +00003// 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
Kuba Breckaafdf8422014-10-10 23:43:03 +00006//
7//===----------------------------------------------------------------------===//
8
9#include "lldb/Target/InstrumentationRuntimeStopInfo.h"
10
Kuba Breckaafdf8422014-10-10 23:43:03 +000011#include "lldb/Target/InstrumentationRuntime.h"
Kate Stoneb9c1b512016-09-06 20:57:50 +000012#include "lldb/Target/Process.h"
13#include "lldb/lldb-private.h"
Kuba Breckaafdf8422014-10-10 23:43:03 +000014
15using namespace lldb;
16using namespace lldb_private;
17
Kate Stoneb9c1b512016-09-06 20:57:50 +000018InstrumentationRuntimeStopInfo::InstrumentationRuntimeStopInfo(
19 Thread &thread, std::string description,
20 StructuredData::ObjectSP additional_data)
21 : StopInfo(thread, 0) {
22 m_extended_info = additional_data;
23 m_description = description;
Kuba Breckaafdf8422014-10-10 23:43:03 +000024}
25
Kate Stoneb9c1b512016-09-06 20:57:50 +000026const char *InstrumentationRuntimeStopInfo::GetDescription() {
27 return m_description.c_str();
Kuba Breckaafdf8422014-10-10 23:43:03 +000028}
29
30StopInfoSP
Kate Stoneb9c1b512016-09-06 20:57:50 +000031InstrumentationRuntimeStopInfo::CreateStopReasonWithInstrumentationData(
32 Thread &thread, std::string description,
33 StructuredData::ObjectSP additionalData) {
34 return StopInfoSP(
35 new InstrumentationRuntimeStopInfo(thread, description, additionalData));
Kuba Breckaafdf8422014-10-10 23:43:03 +000036}