LLDB  mainline
ArchitectureAArch64.cpp
Go to the documentation of this file.
1 //===-- ArchitectureAArch64.cpp -------------------------------------------===//
2 //
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
6 //
7 //===----------------------------------------------------------------------===//
8 
11 #include "lldb/Utility/ArchSpec.h"
12 
13 using namespace lldb_private;
14 using namespace lldb;
15 
17 
18 void ArchitectureAArch64::Initialize() {
19  PluginManager::RegisterPlugin(GetPluginNameStatic(),
20  "AArch64-specific algorithms",
22 }
23 
26 }
27 
28 std::unique_ptr<Architecture>
30  auto machine = arch.GetMachine();
31  if (machine != llvm::Triple::aarch64 && machine != llvm::Triple::aarch64_be &&
32  machine != llvm::Triple::aarch64_32) {
33  return nullptr;
34  }
35  return std::unique_ptr<Architecture>(new ArchitectureAArch64());
36 }
lldb_private::ArchSpec
Definition: ArchSpec.h:33
lldb_private::ArchitectureAArch64
Definition: ArchitectureAArch64.h:17
lldb_private::ArchSpec::GetMachine
llvm::Triple::ArchType GetMachine() const
Returns a machine family for the current architecture.
Definition: ArchSpec.cpp:667
lldb_private::PluginManager::UnregisterPlugin
static bool UnregisterPlugin(ABICreateInstance create_callback)
Definition: PluginManager.cpp:295
ArchitectureAArch64.h
lldb_private::ArchitectureAArch64::Terminate
static void Terminate()
Definition: ArchitectureAArch64.cpp:24
ArchSpec.h
PluginManager.h
lldb_private::PluginManager::RegisterPlugin
static bool RegisterPlugin(llvm::StringRef name, llvm::StringRef description, ABICreateInstance create_callback)
Definition: PluginManager.cpp:288
lldb_private
A class that represents a running process on the host machine.
Definition: SBCommandInterpreterRunOptions.h:16
LLDB_PLUGIN_DEFINE
#define LLDB_PLUGIN_DEFINE(PluginName)
Definition: PluginManager.h:31
lldb_private::ArchitectureAArch64::Create
static std::unique_ptr< Architecture > Create(const ArchSpec &arch)
Definition: ArchitectureAArch64.cpp:29
lldb
Definition: SBAddress.h:15