1 //===-- MemoryHistory.cpp ---------------------------------------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
12 // Other libraries and framework includes
14 #include "lldb/Target/MemoryHistory.h"
15 #include "lldb/Core/PluginManager.h"
18 using namespace lldb_private;
20 lldb::MemoryHistorySP MemoryHistory::FindPlugin(const ProcessSP process) {
21 MemoryHistoryCreateInstance create_callback = nullptr;
23 for (uint32_t idx = 0;
24 (create_callback = PluginManager::GetMemoryHistoryCreateCallbackAtIndex(
27 MemoryHistorySP memory_history_sp(create_callback(process));
28 if (memory_history_sp)
29 return memory_history_sp;
32 return MemoryHistorySP();