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 //===----------------------------------------------------------------------===//
10 #include "lldb/Target/MemoryHistory.h"
11 #include "lldb/Core/PluginManager.h"
14 using namespace lldb_private;
16 lldb::MemoryHistorySP MemoryHistory::FindPlugin(const ProcessSP process) {
17 MemoryHistoryCreateInstance create_callback = nullptr;
19 for (uint32_t idx = 0;
20 (create_callback = PluginManager::GetMemoryHistoryCreateCallbackAtIndex(
23 MemoryHistorySP memory_history_sp(create_callback(process));
24 if (memory_history_sp)
25 return memory_history_sp;
28 return MemoryHistorySP();