1 //===-- UnwindAssembly.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/lldb-private.h" 11 #include "lldb/Core/PluginManager.h" 12 #include "lldb/Core/PluginInterface.h" 13 #include "lldb/Target/UnwindAssembly.h" 14 15 using namespace lldb; 16 using namespace lldb_private; 17 18 UnwindAssembly* FindPlugin(const ArchSpec & arch)19UnwindAssembly::FindPlugin (const ArchSpec &arch) 20 { 21 UnwindAssemblyCreateInstance create_callback; 22 23 for (uint32_t idx = 0; 24 (create_callback = PluginManager::GetUnwindAssemblyCreateCallbackAtIndex(idx)) != NULL; 25 ++idx) 26 { 27 std::unique_ptr<UnwindAssembly> assembly_profiler_ap (create_callback (arch)); 28 if (assembly_profiler_ap.get ()) 29 return assembly_profiler_ap.release (); 30 } 31 return NULL; 32 } 33 UnwindAssembly(const ArchSpec & arch)34UnwindAssembly::UnwindAssembly (const ArchSpec &arch) : 35 m_arch (arch) 36 { 37 } 38 ~UnwindAssembly()39UnwindAssembly::~UnwindAssembly () 40 { 41 } 42