blob: b97096b06d762ac0474711d5c021fd350708503b [file] [log] [blame]
Kuba Breckabeed8212014-09-04 01:03:18 +00001//===-- 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
14using namespace lldb;
15using namespace lldb_private;
16
17lldb::MemoryHistorySP
18MemoryHistory::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 {
Jason Molenda48c04402014-10-16 16:59:23 +000024 MemoryHistorySP memory_history_sp (create_callback (process));
25 if (memory_history_sp.get())
26 return memory_history_sp;
Kuba Breckabeed8212014-09-04 01:03:18 +000027 }
28
29 return MemoryHistorySP();
30}