Kuba Brecka | afdf842 | 2014-10-10 23:43:03 +0000 | [diff] [blame] | 1 | //===-- InstrumentationRuntimeStopInfo.cpp ----------------------*- C++ -*-===// |
| 2 | // |
| 3 | // The LLVM Compiler Infrastructure |
| 4 | // |
| 5 | // This file is distributed under the University of Illinois Open Source |
| 6 | // License. See LICENSE.TXT for details. |
| 7 | // |
| 8 | //===----------------------------------------------------------------------===// |
| 9 | |
| 10 | #include "lldb/Target/InstrumentationRuntimeStopInfo.h" |
| 11 | |
Kuba Brecka | afdf842 | 2014-10-10 23:43:03 +0000 | [diff] [blame] | 12 | #include "lldb/Target/InstrumentationRuntime.h" |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 13 | #include "lldb/Target/Process.h" |
| 14 | #include "lldb/lldb-private.h" |
Kuba Brecka | afdf842 | 2014-10-10 23:43:03 +0000 | [diff] [blame] | 15 | |
| 16 | using namespace lldb; |
| 17 | using namespace lldb_private; |
| 18 | |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 19 | InstrumentationRuntimeStopInfo::InstrumentationRuntimeStopInfo( |
| 20 | Thread &thread, std::string description, |
| 21 | StructuredData::ObjectSP additional_data) |
| 22 | : StopInfo(thread, 0) { |
| 23 | m_extended_info = additional_data; |
| 24 | m_description = description; |
Kuba Brecka | afdf842 | 2014-10-10 23:43:03 +0000 | [diff] [blame] | 25 | } |
| 26 | |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 27 | const char *InstrumentationRuntimeStopInfo::GetDescription() { |
| 28 | return m_description.c_str(); |
Kuba Brecka | afdf842 | 2014-10-10 23:43:03 +0000 | [diff] [blame] | 29 | } |
| 30 | |
| 31 | StopInfoSP |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 32 | InstrumentationRuntimeStopInfo::CreateStopReasonWithInstrumentationData( |
| 33 | Thread &thread, std::string description, |
| 34 | StructuredData::ObjectSP additionalData) { |
| 35 | return StopInfoSP( |
| 36 | new InstrumentationRuntimeStopInfo(thread, description, additionalData)); |
Kuba Brecka | afdf842 | 2014-10-10 23:43:03 +0000 | [diff] [blame] | 37 | } |