]> CyberLeo.Net >> Repos - FreeBSD/releng/10.2.git/blob - contrib/llvm/tools/lldb/source/Target/UnwindAssembly.cpp
- Copy stable/10@285827 to releng/10.2 in preparation for 10.2-RC1
[FreeBSD/releng/10.2.git] / contrib / llvm / tools / lldb / source / Target / UnwindAssembly.cpp
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 UnwindAssemblySP
19 UnwindAssembly::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         UnwindAssemblySP assembly_profiler_ap (create_callback (arch));
28         if (assembly_profiler_ap.get ())
29             return assembly_profiler_ap;
30     }
31     return NULL;
32 }
33
34 UnwindAssembly::UnwindAssembly (const ArchSpec &arch) :
35     m_arch (arch)
36 {
37 }
38
39 UnwindAssembly::~UnwindAssembly ()
40 {
41 }