Kuba Brecka | beed821 | 2014-09-04 01:03:18 +0000 | [diff] [blame^] | 1 | //===-- MemoryHistory.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/MemoryHistory.h" |
| 11 | |
| 12 | #include "lldb/Core/PluginManager.h" |
| 13 | |
| 14 | using namespace lldb; |
| 15 | using namespace lldb_private; |
| 16 | |
| 17 | lldb::MemoryHistorySP |
| 18 | MemoryHistory::FindPlugin (const ProcessSP process) |
| 19 | { |
| 20 | MemoryHistoryCreateInstance create_callback = NULL; |
| 21 | |
| 22 | for (uint32_t idx = 0; (create_callback = PluginManager::GetMemoryHistoryCreateCallbackAtIndex(idx)) != NULL; ++idx) |
| 23 | { |
| 24 | return create_callback(process); |
| 25 | } |
| 26 | |
| 27 | return MemoryHistorySP(); |
| 28 | } |