blob: af7f86fe492aeb44c344668d381f24e6200160a4 [file] [log] [blame]
Greg Clayton7be25422011-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
Jean-Daniel Dupas36b5eea2014-02-03 23:49:47 +000018UnwindAssemblySP
Greg Clayton7be25422011-04-25 21:14:26 +000019UnwindAssembly::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 {
Jean-Daniel Dupas36b5eea2014-02-03 23:49:47 +000027 UnwindAssemblySP assembly_profiler_ap (create_callback (arch));
Greg Clayton7be25422011-04-25 21:14:26 +000028 if (assembly_profiler_ap.get ())
Jean-Daniel Dupas36b5eea2014-02-03 23:49:47 +000029 return assembly_profiler_ap;
Greg Clayton7be25422011-04-25 21:14:26 +000030 }
31 return NULL;
32}
33
Greg Clayton2ed751b2011-04-26 04:39:08 +000034UnwindAssembly::UnwindAssembly (const ArchSpec &arch) :
35 m_arch (arch)
Greg Clayton7be25422011-04-25 21:14:26 +000036{
37}
38
39UnwindAssembly::~UnwindAssembly ()
40{
41}