summaryrefslogtreecommitdiffstats
path: root/contrib/llvm/tools/lldb/source/Target/MemoryHistory.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/llvm/tools/lldb/source/Target/MemoryHistory.cpp')
-rw-r--r--contrib/llvm/tools/lldb/source/Target/MemoryHistory.cpp30
1 files changed, 30 insertions, 0 deletions
diff --git a/contrib/llvm/tools/lldb/source/Target/MemoryHistory.cpp b/contrib/llvm/tools/lldb/source/Target/MemoryHistory.cpp
new file mode 100644
index 0000000..b97096b
--- /dev/null
+++ b/contrib/llvm/tools/lldb/source/Target/MemoryHistory.cpp
@@ -0,0 +1,30 @@
+//===-- MemoryHistory.cpp -------------------------*- C++ -*-===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+#include "lldb/Target/MemoryHistory.h"
+
+#include "lldb/Core/PluginManager.h"
+
+using namespace lldb;
+using namespace lldb_private;
+
+lldb::MemoryHistorySP
+MemoryHistory::FindPlugin (const ProcessSP process)
+{
+ MemoryHistoryCreateInstance create_callback = NULL;
+
+ for (uint32_t idx = 0; (create_callback = PluginManager::GetMemoryHistoryCreateCallbackAtIndex(idx)) != NULL; ++idx)
+ {
+ MemoryHistorySP memory_history_sp (create_callback (process));
+ if (memory_history_sp.get())
+ return memory_history_sp;
+ }
+
+ return MemoryHistorySP();
+}
OpenPOWER on IntegriCloud