summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonas Devlieghere <jonas@devlieghere.com>2019-03-27 16:23:50 +0000
committerJonas Devlieghere <jonas@devlieghere.com>2019-03-27 16:23:50 +0000
commitf8819bd510d4301cec54a252918b7f299dfd06e1 (patch)
treef56275aa6612e6159684236e8b0dd52a4ff2018f
parenta194656fa2452aba7bd3e46cd282d8e7f1aeab3f (diff)
downloadbcm5719-llvm-f8819bd510d4301cec54a252918b7f299dfd06e1.tar.gz
bcm5719-llvm-f8819bd510d4301cec54a252918b7f299dfd06e1.zip
[Platform] Remove Kalimba Platform
This patch removes the Kalimba platform. For more information please refer to the corresponding thread on the mailing list. http://lists.llvm.org/pipermail/lldb-dev/2019-March/014921.html llvm-svn: 357086
-rw-r--r--lldb/include/lldb/Utility/ArchSpec.h7
-rw-r--r--lldb/lldb.xcodeproj/project.pbxproj14
-rw-r--r--lldb/packages/Python/lldbsuite/test/functionalities/object-file/TestImageListMultiArchitecture.py2
-rw-r--r--lldb/source/API/SystemInitializerFull.cpp3
-rw-r--r--lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp73
-rw-r--r--lldb/source/Plugins/Platform/CMakeLists.txt1
-rw-r--r--lldb/source/Plugins/Platform/Kalimba/CMakeLists.txt8
-rw-r--r--lldb/source/Plugins/Platform/Kalimba/PlatformKalimba.cpp153
-rw-r--r--lldb/source/Plugins/Platform/Kalimba/PlatformKalimba.h78
-rw-r--r--lldb/source/Utility/ArchSpec.cpp48
-rw-r--r--lldb/tools/lldb-test/SystemInitializerTest.cpp3
11 files changed, 10 insertions, 380 deletions
diff --git a/lldb/include/lldb/Utility/ArchSpec.h b/lldb/include/lldb/Utility/ArchSpec.h
index c05c84c061c..38c43e2f479 100644
--- a/lldb/include/lldb/Utility/ArchSpec.h
+++ b/lldb/include/lldb/Utility/ArchSpec.h
@@ -185,10 +185,6 @@ public:
eCore_uknownMach32,
eCore_uknownMach64,
- eCore_kalimba3,
- eCore_kalimba4,
- eCore_kalimba5,
-
kNumCores,
kCore_invalid,
@@ -222,9 +218,6 @@ public:
kCore_hexagon_first = eCore_hexagon_generic,
kCore_hexagon_last = eCore_hexagon_hexagonv5,
- kCore_kalimba_first = eCore_kalimba3,
- kCore_kalimba_last = eCore_kalimba5,
-
kCore_mips32_first = eCore_mips32,
kCore_mips32_last = eCore_mips32r6,
diff --git a/lldb/lldb.xcodeproj/project.pbxproj b/lldb/lldb.xcodeproj/project.pbxproj
index b2bbe0ac8d9..b981d9f685c 100644
--- a/lldb/lldb.xcodeproj/project.pbxproj
+++ b/lldb/lldb.xcodeproj/project.pbxproj
@@ -623,7 +623,6 @@
AF254E31170CCC33007AE5C9 /* PlatformDarwinKernel.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AF254E2F170CCC33007AE5C9 /* PlatformDarwinKernel.cpp */; };
9A20571C1F3B867400F6C293 /* PlatformDarwinTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9A20571A1F3B866F00F6C293 /* PlatformDarwinTest.cpp */; };
2694E99D14FC0BB30076DE67 /* PlatformFreeBSD.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2694E99A14FC0BB30076DE67 /* PlatformFreeBSD.cpp */; };
- 23042D121976CA1D00621B2C /* PlatformKalimba.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 23042D101976CA0A00621B2C /* PlatformKalimba.cpp */; };
2694E9A414FC0BBD0076DE67 /* PlatformLinux.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2694E9A114FC0BBD0076DE67 /* PlatformLinux.cpp */; };
2689009B13353E4200698AC0 /* PlatformMacOSX.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26C5577B132575AD008FD8FE /* PlatformMacOSX.cpp */; };
26EFB61B1BFE8D3E00544801 /* PlatformNetBSD.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26EFB6181BFE8D3E00544801 /* PlatformNetBSD.cpp */; };
@@ -2488,8 +2487,6 @@
9A20571A1F3B866F00F6C293 /* PlatformDarwinTest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = PlatformDarwinTest.cpp; path = Platform/PlatformDarwinTest.cpp; sourceTree = "<group>"; };
2694E99A14FC0BB30076DE67 /* PlatformFreeBSD.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PlatformFreeBSD.cpp; sourceTree = "<group>"; };
2694E99B14FC0BB30076DE67 /* PlatformFreeBSD.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PlatformFreeBSD.h; sourceTree = "<group>"; };
- 23042D101976CA0A00621B2C /* PlatformKalimba.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = PlatformKalimba.cpp; sourceTree = "<group>"; };
- 23042D111976CA0A00621B2C /* PlatformKalimba.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PlatformKalimba.h; sourceTree = "<group>"; };
2694E9A114FC0BBD0076DE67 /* PlatformLinux.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PlatformLinux.cpp; sourceTree = "<group>"; };
2694E9A214FC0BBD0076DE67 /* PlatformLinux.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PlatformLinux.h; sourceTree = "<group>"; };
26C5577B132575AD008FD8FE /* PlatformMacOSX.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PlatformMacOSX.cpp; sourceTree = "<group>"; };
@@ -3570,15 +3567,6 @@
sourceTree = "<group>";
usesTabs = 0;
};
- 23042D0F1976C9D800621B2C /* Kalimba */ = {
- isa = PBXGroup;
- children = (
- 23042D111976CA0A00621B2C /* PlatformKalimba.h */,
- 23042D101976CA0A00621B2C /* PlatformKalimba.cpp */,
- );
- path = Kalimba;
- sourceTree = "<group>";
- };
2321F9331BDD326500BA9A93 /* unittests */ = {
isa = PBXGroup;
children = (
@@ -5856,7 +5844,6 @@
6D55BAE61A8CD08C00A70529 /* Android */,
2694E99814FC0BB30076DE67 /* FreeBSD */,
264A97BC133918A30017F0BE /* GDB Server */,
- 23042D0F1976C9D800621B2C /* Kalimba */,
2694E99F14FC0BBD0076DE67 /* Linux */,
26C5577F132575C8008FD8FE /* MacOSX */,
26EFB6151BFE8D3E00544801 /* NetBSD */,
@@ -8013,7 +8000,6 @@
2689001213353DDE00698AC0 /* CommandObjectApropos.cpp in Sources */,
4C88BC2A1BA3722B00AA0964 /* Expression.cpp in Sources */,
8C3BD9961EF45DA50016C343 /* MainThreadCheckerRuntime.cpp in Sources */,
- 23042D121976CA1D00621B2C /* PlatformKalimba.cpp in Sources */,
2689001413353DDE00698AC0 /* CommandObjectBreakpoint.cpp in Sources */,
4C61465E223059B000D686F9 /* ClangExpressionSourceCode.cpp in Sources */,
2689001513353DDE00698AC0 /* CommandObjectBreakpointCommand.cpp in Sources */,
diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/object-file/TestImageListMultiArchitecture.py b/lldb/packages/Python/lldbsuite/test/functionalities/object-file/TestImageListMultiArchitecture.py
index 3cc87666d08..326c613d617 100644
--- a/lldb/packages/Python/lldbsuite/test/functionalities/object-file/TestImageListMultiArchitecture.py
+++ b/lldb/packages/Python/lldbsuite/test/functionalities/object-file/TestImageListMultiArchitecture.py
@@ -30,8 +30,6 @@ class TestImageListMultiArchitecture(TestBase):
"hello-netbsd-6.1-x86_64-gcc-4.5.3": re.compile(r"x86_64-(\*)?-netbsd6.1.4(-unknown)? x86_64"),
"hello-ubuntu-14.04-x86_64-gcc-4.8.2": re.compile(r"x86_64-(\*)?-linux(-unknown)? x86_64"),
"hello-ubuntu-14.04-x86_64-clang-3.5pre": re.compile(r"x86_64-(\*)?-linux(-unknown)? x86_64"),
- "hello-unknown-kalimba_arch4-kcc-36": re.compile(r"kalimba4-csr-(unknown|\*)(-unknown)? kalimba"),
- "hello-unknown-kalimba_arch5-kcc-39": re.compile(r"kalimba5-csr-(unknown|\*)(-unknown)? kalimba"),
}
for image_name in images:
diff --git a/lldb/source/API/SystemInitializerFull.cpp b/lldb/source/API/SystemInitializerFull.cpp
index cce5cb95bd1..2752b5a3afa 100644
--- a/lldb/source/API/SystemInitializerFull.cpp
+++ b/lldb/source/API/SystemInitializerFull.cpp
@@ -69,7 +69,6 @@
#include "Plugins/OperatingSystem/Python/OperatingSystemPython.h"
#include "Plugins/Platform/Android/PlatformAndroid.h"
#include "Plugins/Platform/FreeBSD/PlatformFreeBSD.h"
-#include "Plugins/Platform/Kalimba/PlatformKalimba.h"
#include "Plugins/Platform/Linux/PlatformLinux.h"
#include "Plugins/Platform/MacOSX/PlatformMacOSX.h"
#include "Plugins/Platform/MacOSX/PlatformRemoteiOS.h"
@@ -150,7 +149,6 @@ llvm::Error SystemInitializerFull::Initialize() {
platform_netbsd::PlatformNetBSD::Initialize();
platform_openbsd::PlatformOpenBSD::Initialize();
PlatformWindows::Initialize();
- PlatformKalimba::Initialize();
platform_android::PlatformAndroid::Initialize();
PlatformRemoteiOS::Initialize();
PlatformMacOSX::Initialize();
@@ -356,7 +354,6 @@ void SystemInitializerFull::Terminate() {
platform_netbsd::PlatformNetBSD::Terminate();
platform_openbsd::PlatformOpenBSD::Terminate();
PlatformWindows::Terminate();
- PlatformKalimba::Terminate();
platform_android::PlatformAndroid::Terminate();
PlatformMacOSX::Terminate();
PlatformRemoteiOS::Terminate();
diff --git a/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp b/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
index 53c6811cd17..d3a78239427 100644
--- a/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
+++ b/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
@@ -57,7 +57,6 @@ const char *const LLDB_NT_OWNER_GNU = "GNU";
const char *const LLDB_NT_OWNER_NETBSD = "NetBSD";
const char *const LLDB_NT_OWNER_NETBSDCORE = "NetBSD-CORE";
const char *const LLDB_NT_OWNER_OPENBSD = "OpenBSD";
-const char *const LLDB_NT_OWNER_CSR = "csr";
const char *const LLDB_NT_OWNER_ANDROID = "Android";
const char *const LLDB_NT_OWNER_CORE = "CORE";
const char *const LLDB_NT_OWNER_LINUX = "LINUX";
@@ -274,27 +273,6 @@ bool ELFNote::Parse(const DataExtractor &data, lldb::offset_t *offset) {
return true;
}
-static uint32_t kalimbaVariantFromElfFlags(const elf::elf_word e_flags) {
- const uint32_t dsp_rev = e_flags & 0xFF;
- uint32_t kal_arch_variant = LLDB_INVALID_CPUTYPE;
- switch (dsp_rev) {
- // TODO(mg11) Support more variants
- case 10:
- kal_arch_variant = llvm::Triple::KalimbaSubArch_v3;
- break;
- case 14:
- kal_arch_variant = llvm::Triple::KalimbaSubArch_v4;
- break;
- case 17:
- case 20:
- kal_arch_variant = llvm::Triple::KalimbaSubArch_v5;
- break;
- default:
- break;
- }
- return kal_arch_variant;
-}
-
static uint32_t mipsVariantFromElfFlags (const elf::ELFHeader &header) {
const uint32_t mips_arch = header.e_flags & llvm::ELF::EF_MIPS_ARCH;
uint32_t endian = header.e_ident[EI_DATA];
@@ -352,32 +330,7 @@ static uint32_t subTypeFromElfHeader(const elf::ELFHeader &header) {
if (header.e_machine == llvm::ELF::EM_MIPS)
return mipsVariantFromElfFlags(header);
- return llvm::ELF::EM_CSR_KALIMBA == header.e_machine
- ? kalimbaVariantFromElfFlags(header.e_flags)
- : LLDB_INVALID_CPUTYPE;
-}
-
-//! The kalimba toolchain identifies a code section as being
-//! one with the SHT_PROGBITS set in the section sh_type and the top
-//! bit in the 32-bit address field set.
-static lldb::SectionType
-kalimbaSectionType(const elf::ELFHeader &header,
- const elf::ELFSectionHeader &sect_hdr) {
- if (llvm::ELF::EM_CSR_KALIMBA != header.e_machine) {
- return eSectionTypeOther;
- }
-
- if (llvm::ELF::SHT_NOBITS == sect_hdr.sh_type) {
- return eSectionTypeZeroFill;
- }
-
- if (llvm::ELF::SHT_PROGBITS == sect_hdr.sh_type) {
- const lldb::addr_t KAL_CODE_BIT = 1 << 31;
- return KAL_CODE_BIT & sect_hdr.sh_addr ? eSectionTypeCode
- : eSectionTypeData;
- }
-
- return eSectionTypeOther;
+ return LLDB_INVALID_CPUTYPE;
}
// Arbitrary constant used as UUID prefix for core files.
@@ -1336,21 +1289,6 @@ ObjectFileELF::RefineModuleDetailsFromNote(lldb_private::DataExtractor &data,
// Set the elf OS version to OpenBSD. Also clear the vendor.
arch_spec.GetTriple().setOS(llvm::Triple::OSType::OpenBSD);
arch_spec.GetTriple().setVendor(llvm::Triple::VendorType::UnknownVendor);
- }
- // Process CSR kalimba notes
- else if ((note.n_type == LLDB_NT_GNU_ABI_TAG) &&
- (note.n_name == LLDB_NT_OWNER_CSR)) {
- arch_spec.GetTriple().setOS(llvm::Triple::OSType::UnknownOS);
- arch_spec.GetTriple().setVendor(llvm::Triple::VendorType::CSR);
-
- // TODO At some point the description string could be processed.
- // It could provide a steer towards the kalimba variant which this ELF
- // targets.
- if (note.n_descsz) {
- const char *cstr =
- data.GetCStr(&offset, llvm::alignTo(note.n_descsz, 4));
- (void)cstr;
- }
} else if (note.n_name == LLDB_NT_OWNER_ANDROID) {
arch_spec.GetTriple().setOS(llvm::Triple::OSType::Linux);
arch_spec.GetTriple().setEnvironment(
@@ -1808,14 +1746,7 @@ SectionType ObjectFileELF::GetSectionType(const ELFSectionHeaderInfo &H) const {
case SHT_DYNAMIC:
return eSectionTypeELFDynamicLinkInfo;
}
- SectionType Type = GetSectionTypeFromName(H.section_name.GetStringRef());
- if (Type == eSectionTypeOther) {
- // the kalimba toolchain assumes that ELF section names are free-form.
- // It does support linkscripts which (can) give rise to various
- // arbitrarily named sections being "Code" or "Data".
- Type = kalimbaSectionType(m_header, H);
- }
- return Type;
+ return GetSectionTypeFromName(H.section_name.GetStringRef());
}
static uint32_t GetTargetByteSize(SectionType Type, const ArchSpec &arch) {
diff --git a/lldb/source/Plugins/Platform/CMakeLists.txt b/lldb/source/Plugins/Platform/CMakeLists.txt
index ddb71212ce4..5f284e517dc 100644
--- a/lldb/source/Plugins/Platform/CMakeLists.txt
+++ b/lldb/source/Plugins/Platform/CMakeLists.txt
@@ -14,5 +14,4 @@
add_subdirectory(POSIX)
add_subdirectory(gdb-server)
-add_subdirectory(Kalimba)
add_subdirectory(Android)
diff --git a/lldb/source/Plugins/Platform/Kalimba/CMakeLists.txt b/lldb/source/Plugins/Platform/Kalimba/CMakeLists.txt
deleted file mode 100644
index 02f1827f9a4..00000000000
--- a/lldb/source/Plugins/Platform/Kalimba/CMakeLists.txt
+++ /dev/null
@@ -1,8 +0,0 @@
-add_lldb_library(lldbPluginPlatformKalimba PLUGIN
- PlatformKalimba.cpp
-
- LINK_LIBS
- lldbCore
- lldbHost
- lldbTarget
- )
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.
-}
diff --git a/lldb/source/Plugins/Platform/Kalimba/PlatformKalimba.h b/lldb/source/Plugins/Platform/Kalimba/PlatformKalimba.h
deleted file mode 100644
index 880c3ae7057..00000000000
--- a/lldb/source/Plugins/Platform/Kalimba/PlatformKalimba.h
+++ /dev/null
@@ -1,78 +0,0 @@
-//===-- PlatformKalimba.h ---------------------------------------*- 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
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef liblldb_PlatformKalimba_h_
-#define liblldb_PlatformKalimba_h_
-
-#include "lldb/Target/Platform.h"
-
-namespace lldb_private {
-
-class PlatformKalimba : public Platform {
-public:
- PlatformKalimba(bool is_host);
-
- ~PlatformKalimba() override;
-
- static void Initialize();
-
- static void Terminate();
-
- //------------------------------------------------------------
- // lldb_private::PluginInterface functions
- //------------------------------------------------------------
- static lldb::PlatformSP CreateInstance(bool force,
- const lldb_private::ArchSpec *arch);
-
- static lldb_private::ConstString GetPluginNameStatic(bool is_host);
-
- static const char *GetPluginDescriptionStatic(bool is_host);
-
- lldb_private::ConstString GetPluginName() override;
-
- uint32_t GetPluginVersion() override { return 1; }
-
- //------------------------------------------------------------
- // lldb_private::Platform functions
- //------------------------------------------------------------
- const char *GetDescription() override {
- return GetPluginDescriptionStatic(IsHost());
- }
-
- void GetStatus(Stream &strm) override;
-
- bool GetSupportedArchitectureAtIndex(uint32_t idx, ArchSpec &arch) override;
-
- size_t GetSoftwareBreakpointTrapOpcode(Target &target,
- BreakpointSite *bp_site) override;
-
- lldb_private::Status
- LaunchProcess(lldb_private::ProcessLaunchInfo &launch_info) override;
-
- lldb::ProcessSP Attach(ProcessAttachInfo &attach_info, Debugger &debugger,
- Target *target, Status &error) override;
-
- // Kalimba processes can not be launched by spawning and attaching.
- bool CanDebugProcess() override { return false; }
-
- void CalculateTrapHandlerSymbolNames() override;
-
- UserIDResolver &GetUserIDResolver() override {
- return UserIDResolver::GetNoopResolver();
- }
-
-protected:
- lldb::PlatformSP m_remote_platform_sp;
-
-private:
- DISALLOW_COPY_AND_ASSIGN(PlatformKalimba);
-};
-
-} // namespace lldb_private
-
-#endif // liblldb_PlatformKalimba_h_
diff --git a/lldb/source/Utility/ArchSpec.cpp b/lldb/source/Utility/ArchSpec.cpp
index 9e835aad020..acd677b332d 100644
--- a/lldb/source/Utility/ArchSpec.cpp
+++ b/lldb/source/Utility/ArchSpec.cpp
@@ -214,13 +214,7 @@ static const CoreDefinition g_core_definitions[] = {
ArchSpec::eCore_uknownMach32, "unknown-mach-32"},
{eByteOrderLittle, 8, 4, 4, llvm::Triple::UnknownArch,
ArchSpec::eCore_uknownMach64, "unknown-mach-64"},
-
- {eByteOrderBig, 4, 1, 1, llvm::Triple::kalimba, ArchSpec::eCore_kalimba3,
- "kalimba3"},
- {eByteOrderLittle, 4, 1, 1, llvm::Triple::kalimba, ArchSpec::eCore_kalimba4,
- "kalimba4"},
- {eByteOrderLittle, 4, 1, 1, llvm::Triple::kalimba, ArchSpec::eCore_kalimba5,
- "kalimba5"}};
+};
// Ensure that we have an entry in the g_core_definitions for each core. If you
// comment out an entry above, you will need to comment out the corresponding
@@ -452,12 +446,6 @@ static const ArchDefinitionEntry g_elf_arch_entries[] = {
ArchSpec::eMIPSSubType_mips64r6el, 0xFFFFFFFFu, 0xFFFFFFFFu}, // mips64r6el
{ArchSpec::eCore_hexagon_generic, llvm::ELF::EM_HEXAGON,
LLDB_INVALID_CPUTYPE, 0xFFFFFFFFu, 0xFFFFFFFFu}, // HEXAGON
- {ArchSpec::eCore_kalimba3, llvm::ELF::EM_CSR_KALIMBA,
- llvm::Triple::KalimbaSubArch_v3, 0xFFFFFFFFu, 0xFFFFFFFFu}, // KALIMBA
- {ArchSpec::eCore_kalimba4, llvm::ELF::EM_CSR_KALIMBA,
- llvm::Triple::KalimbaSubArch_v4, 0xFFFFFFFFu, 0xFFFFFFFFu}, // KALIMBA
- {ArchSpec::eCore_kalimba5, llvm::ELF::EM_CSR_KALIMBA,
- llvm::Triple::KalimbaSubArch_v5, 0xFFFFFFFFu, 0xFFFFFFFFu} // KALIMBA
};
static const ArchDefinition g_elf_arch_def = {
@@ -728,30 +716,10 @@ uint32_t ArchSpec::GetMachOCPUSubType() const {
}
uint32_t ArchSpec::GetDataByteSize() const {
- switch (m_core) {
- case eCore_kalimba3:
- return 4;
- case eCore_kalimba4:
- return 1;
- case eCore_kalimba5:
- return 4;
- default:
- return 1;
- }
return 1;
}
uint32_t ArchSpec::GetCodeByteSize() const {
- switch (m_core) {
- case eCore_kalimba3:
- return 4;
- case eCore_kalimba4:
- return 1;
- case eCore_kalimba5:
- return 1;
- default:
- return 1;
- }
return 1;
}
@@ -942,13 +910,13 @@ bool ArchSpec::SetArchitecture(ArchitectureType arch_type, uint32_t cpu,
m_triple.setVendor(llvm::Triple::Apple);
// Don't set the OS. It could be simulator, macosx, ios, watchos,
- // tvos, bridgeos. We could get close with the cpu type - but we
- // can't get it right all of the time. Better to leave this unset
- // so other sections of code will set it when they have more
- // information. NB: don't call m_triple.setOS (llvm::Triple::UnknownOS).
- // That sets the OSName to "unknown" and the
- // ArchSpec::TripleVendorWasSpecified() method says that any OSName
- // setting means it was specified.
+ // tvos, bridgeos. We could get close with the cpu type - but we
+ // can't get it right all of the time. Better to leave this unset
+ // so other sections of code will set it when they have more
+ // information. NB: don't call m_triple.setOS
+ // (llvm::Triple::UnknownOS). That sets the OSName to "unknown" and
+ // the ArchSpec::TripleVendorWasSpecified() method says that any
+ // OSName setting means it was specified.
} else if (arch_type == eArchTypeELF) {
switch (os) {
case llvm::ELF::ELFOSABI_AIX:
diff --git a/lldb/tools/lldb-test/SystemInitializerTest.cpp b/lldb/tools/lldb-test/SystemInitializerTest.cpp
index f5b8f887e09..9d535deb2a9 100644
--- a/lldb/tools/lldb-test/SystemInitializerTest.cpp
+++ b/lldb/tools/lldb-test/SystemInitializerTest.cpp
@@ -57,7 +57,6 @@
#include "Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.h"
#include "Plugins/Platform/Android/PlatformAndroid.h"
#include "Plugins/Platform/FreeBSD/PlatformFreeBSD.h"
-#include "Plugins/Platform/Kalimba/PlatformKalimba.h"
#include "Plugins/Platform/Linux/PlatformLinux.h"
#include "Plugins/Platform/MacOSX/PlatformMacOSX.h"
#include "Plugins/Platform/MacOSX/PlatformRemoteiOS.h"
@@ -129,7 +128,6 @@ llvm::Error SystemInitializerTest::Initialize() {
platform_netbsd::PlatformNetBSD::Initialize();
platform_openbsd::PlatformOpenBSD::Initialize();
PlatformWindows::Initialize();
- PlatformKalimba::Initialize();
platform_android::PlatformAndroid::Initialize();
PlatformRemoteiOS::Initialize();
PlatformMacOSX::Initialize();
@@ -325,7 +323,6 @@ void SystemInitializerTest::Terminate() {
platform_netbsd::PlatformNetBSD::Terminate();
platform_openbsd::PlatformOpenBSD::Terminate();
PlatformWindows::Terminate();
- PlatformKalimba::Terminate();
platform_android::PlatformAndroid::Terminate();
PlatformMacOSX::Terminate();
PlatformRemoteiOS::Terminate();
OpenPOWER on IntegriCloud