Kuba Brecka | afdf842 | 2014-10-10 23:43:03 +0000 | [diff] [blame] | 1 | //===-- InstrumentationRuntimeStopInfo.cpp ----------------------*- C++ -*-===// |
| 2 | // |
Chandler Carruth | 2946cd7 | 2019-01-19 08:50:56 +0000 | [diff] [blame] | 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 |
Kuba Brecka | afdf842 | 2014-10-10 23:43:03 +0000 | [diff] [blame] | 6 | // |
| 7 | //===----------------------------------------------------------------------===// |
| 8 | |
| 9 | #include "lldb/Target/InstrumentationRuntimeStopInfo.h" |
| 10 | |
Kuba Brecka | afdf842 | 2014-10-10 23:43:03 +0000 | [diff] [blame] | 11 | #include "lldb/Target/InstrumentationRuntime.h" |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 12 | #include "lldb/Target/Process.h" |
| 13 | #include "lldb/lldb-private.h" |
Kuba Brecka | afdf842 | 2014-10-10 23:43:03 +0000 | [diff] [blame] | 14 | |
| 15 | using namespace lldb; |
| 16 | using namespace lldb_private; |
| 17 | |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 18 | InstrumentationRuntimeStopInfo::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 Brecka | afdf842 | 2014-10-10 23:43:03 +0000 | [diff] [blame] | 24 | } |
| 25 | |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 26 | const char *InstrumentationRuntimeStopInfo::GetDescription() { |
| 27 | return m_description.c_str(); |
Kuba Brecka | afdf842 | 2014-10-10 23:43:03 +0000 | [diff] [blame] | 28 | } |
| 29 | |
| 30 | StopInfoSP |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 31 | InstrumentationRuntimeStopInfo::CreateStopReasonWithInstrumentationData( |
| 32 | Thread &thread, std::string description, |
| 33 | StructuredData::ObjectSP additionalData) { |
| 34 | return StopInfoSP( |
| 35 | new InstrumentationRuntimeStopInfo(thread, description, additionalData)); |
Kuba Brecka | afdf842 | 2014-10-10 23:43:03 +0000 | [diff] [blame] | 36 | } |