blob: af662b97c7442e7cee9cea490630b07103b6d5e6 [file] [log] [blame]
Greg Clayton8badcb22011-04-25 21:14:26 +00001//===-- 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
15using namespace lldb;
16using namespace lldb_private;
17
18UnwindAssembly*
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::auto_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
Greg Clayton888a7332011-04-26 04:39:08 +000034UnwindAssembly::UnwindAssembly (const ArchSpec &arch) :
35 m_arch (arch)
Greg Clayton8badcb22011-04-25 21:14:26 +000036{
37}
38
39UnwindAssembly::~UnwindAssembly ()
40{
41}