summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/Platform/Kalimba/PlatformKalimba.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/Plugins/Platform/Kalimba/PlatformKalimba.cpp')
-rw-r--r--lldb/source/Plugins/Platform/Kalimba/PlatformKalimba.cpp153
1 files changed, 0 insertions, 153 deletions
diff --git a/lldb/source/Plugins/Platform/Kalimba/PlatformKalimba.cpp b/lldb/source/Plugins/Platform/Kalimba/PlatformKalimba.cpp
deleted file mode 100644
index ddcc6290235..00000000000
--- a/lldb/source/Plugins/Platform/Kalimba/PlatformKalimba.cpp
+++ /dev/null
@@ -1,153 +0,0 @@
-//===-- PlatformKalimba.cpp ---------------------------------------*- C++
-//-*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "PlatformKalimba.h"
-#include "lldb/Host/Config.h"
-
-#include "lldb/Core/Debugger.h"
-#include "lldb/Core/Module.h"
-#include "lldb/Core/ModuleList.h"
-#include "lldb/Core/ModuleSpec.h"
-#include "lldb/Core/PluginManager.h"
-#include "lldb/Host/HostInfo.h"
-#include "lldb/Target/Process.h"
-#include "lldb/Target/Target.h"
-#include "lldb/Utility/FileSpec.h"
-#include "lldb/Utility/Status.h"
-#include "lldb/Utility/StreamString.h"
-
-using namespace lldb;
-using namespace lldb_private;
-
-static uint32_t g_initialize_count = 0;
-
-PlatformSP PlatformKalimba::CreateInstance(bool force, const ArchSpec *arch) {
- bool create = force;
- if (!create && arch && arch->IsValid()) {
- const llvm::Triple &triple = arch->GetTriple();
- switch (triple.getVendor()) {
- case llvm::Triple::CSR:
- create = true;
- break;
-
- default:
- break;
- }
- }
- if (create)
- return PlatformSP(new PlatformKalimba(false));
- return PlatformSP();
-}
-
-lldb_private::ConstString
-PlatformKalimba::GetPluginNameStatic(bool /*is_host*/) {
- static ConstString g_remote_name("kalimba");
- return g_remote_name;
-}
-
-const char *PlatformKalimba::GetPluginDescriptionStatic(bool /*is_host*/) {
- return "Kalimba user platform plug-in.";
-}
-
-lldb_private::ConstString PlatformKalimba::GetPluginName() {
- return GetPluginNameStatic(false);
-}
-
-void PlatformKalimba::Initialize() {
- Platform::Initialize();
-
- if (g_initialize_count++ == 0) {
- PluginManager::RegisterPlugin(
- PlatformKalimba::GetPluginNameStatic(false),
- PlatformKalimba::GetPluginDescriptionStatic(false),
- PlatformKalimba::CreateInstance);
- }
-}
-
-void PlatformKalimba::Terminate() {
- if (g_initialize_count > 0) {
- if (--g_initialize_count == 0) {
- PluginManager::UnregisterPlugin(PlatformKalimba::CreateInstance);
- }
- }
-
- Platform::Terminate();
-}
-
-//------------------------------------------------------------------
-/// Default Constructor
-//------------------------------------------------------------------
-PlatformKalimba::PlatformKalimba(bool is_host)
- : Platform(is_host), // This is the local host platform
- m_remote_platform_sp() {}
-
-//------------------------------------------------------------------
-/// Destructor.
-///
-/// The destructor is virtual since this class is designed to be
-/// inherited from by the plug-in instance.
-//------------------------------------------------------------------
-PlatformKalimba::~PlatformKalimba() {}
-
-bool PlatformKalimba::GetSupportedArchitectureAtIndex(uint32_t idx,
- ArchSpec &arch) {
- if (idx == 0) {
- arch = ArchSpec("kalimba3-csr-unknown");
- return true;
- }
- if (idx == 1) {
- arch = ArchSpec("kalimba4-csr-unknown");
- return true;
- }
- if (idx == 2) {
- arch = ArchSpec("kalimba5-csr-unknown");
- return true;
- }
- return false;
-}
-
-void PlatformKalimba::GetStatus(Stream &strm) { Platform::GetStatus(strm); }
-
-size_t
-PlatformKalimba::GetSoftwareBreakpointTrapOpcode(Target & /*target*/,
- BreakpointSite * /*bp_site*/) {
- // the target hardware does not support software breakpoints
- return 0;
-}
-
-Status PlatformKalimba::LaunchProcess(ProcessLaunchInfo &launch_info) {
- Status error;
-
- if (IsHost()) {
- error.SetErrorString("native execution is not possible");
- } else {
- error.SetErrorString("the platform is not currently connected");
- }
- return error;
-}
-
-lldb::ProcessSP PlatformKalimba::Attach(ProcessAttachInfo &attach_info,
- Debugger &debugger, Target *target,
- Status &error) {
- lldb::ProcessSP process_sp;
- if (IsHost()) {
- error.SetErrorString("native execution is not possible");
- } else {
- if (m_remote_platform_sp)
- process_sp =
- m_remote_platform_sp->Attach(attach_info, debugger, target, error);
- else
- error.SetErrorString("the platform is not currently connected");
- }
- return process_sp;
-}
-
-void PlatformKalimba::CalculateTrapHandlerSymbolNames() {
- // TODO Research this sometime.
-}
OpenPOWER on IntegriCloud