]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/llvm/tools/lldb/source/Target/MemoryHistory.cpp
MFV r328245: 8856 arc_cksum_is_equal() doesn't take into account ABD-logic
[FreeBSD/FreeBSD.git] / contrib / llvm / tools / lldb / source / Target / MemoryHistory.cpp
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 // C Includes
11 // C++ Includes
12 // Other libraries and framework includes
13 // Project includes
14 #include "lldb/Target/MemoryHistory.h"
15 #include "lldb/Core/PluginManager.h"
16
17 using namespace lldb;
18 using namespace lldb_private;
19
20 lldb::MemoryHistorySP MemoryHistory::FindPlugin(const ProcessSP process) {
21   MemoryHistoryCreateInstance create_callback = nullptr;
22
23   for (uint32_t idx = 0;
24        (create_callback = PluginManager::GetMemoryHistoryCreateCallbackAtIndex(
25             idx)) != nullptr;
26        ++idx) {
27     MemoryHistorySP memory_history_sp(create_callback(process));
28     if (memory_history_sp)
29       return memory_history_sp;
30   }
31
32   return MemoryHistorySP();
33 }