1 //===-- UnwindAssembly.cpp --------------------------------------*- C++ -*-===//
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
9 #include "lldb/Target/UnwindAssembly.h"
10 #include "lldb/Core/PluginInterface.h"
11 #include "lldb/Core/PluginManager.h"
12 #include "lldb/lldb-private.h"
15 using namespace lldb_private;
17 UnwindAssemblySP UnwindAssembly::FindPlugin(const ArchSpec &arch) {
18 UnwindAssemblyCreateInstance create_callback;
20 for (uint32_t idx = 0;
21 (create_callback = PluginManager::GetUnwindAssemblyCreateCallbackAtIndex(
24 UnwindAssemblySP assembly_profiler_up(create_callback(arch));
25 if (assembly_profiler_up)
26 return assembly_profiler_up;
31 UnwindAssembly::UnwindAssembly(const ArchSpec &arch) : m_arch(arch) {}
33 UnwindAssembly::~UnwindAssembly() = default;