Author: jdevlieghere Date: Wed Mar 27 09:23:50 2019 New Revision: 357086 URL: http://llvm.org/viewvc/llvm-project?rev=357086&view=rev Log: [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 Removed: lldb/trunk/source/Plugins/Platform/Kalimba/ Modified: lldb/trunk/include/lldb/Utility/ArchSpec.h lldb/trunk/lldb.xcodeproj/project.pbxproj lldb/trunk/packages/Python/lldbsuite/test/functionalities/object-file/TestImageListMultiArchitecture.py lldb/trunk/source/API/SystemInitializerFull.cpp lldb/trunk/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp lldb/trunk/source/Plugins/Platform/CMakeLists.txt lldb/trunk/source/Utility/ArchSpec.cpp lldb/trunk/tools/lldb-test/SystemInitializerTest.cpp Modified: lldb/trunk/include/lldb/Utility/ArchSpec.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Utility/ArchSpec.h?rev=357086&r1=357085&r2=357086&view=diff ============================================================================== --- lldb/trunk/include/lldb/Utility/ArchSpec.h (original) +++ lldb/trunk/include/lldb/Utility/ArchSpec.h Wed Mar 27 09:23:50 2019 @@ -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, Modified: lldb/trunk/lldb.xcodeproj/project.pbxproj URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/lldb.xcodeproj/project.pbxproj?rev=357086&r1=357085&r2=357086&view=diff ============================================================================== --- lldb/trunk/lldb.xcodeproj/project.pbxproj (original) +++ lldb/trunk/lldb.xcodeproj/project.pbxproj Wed Mar 27 09:23:50 2019 @@ -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 */, Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/object-file/TestImageListMultiArchitecture.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/object-file/TestImageListMultiArchitecture.py?rev=357086&r1=357085&r2=357086&view=diff ============================================================================== --- lldb/trunk/packages/Python/lldbsuite/test/functionalities/object-file/TestImageListMultiArchitecture.py (original) +++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/object-file/TestImageListMultiArchitecture.py Wed Mar 27 09:23:50 2019 @@ -30,8 +30,6 @@ class TestImageListMultiArchitecture(Tes "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: Modified: lldb/trunk/source/API/SystemInitializerFull.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SystemInitializerFull.cpp?rev=357086&r1=357085&r2=357086&view=diff ============================================================================== --- lldb/trunk/source/API/SystemInitializerFull.cpp (original) +++ lldb/trunk/source/API/SystemInitializerFull.cpp Wed Mar 27 09:23:50 2019 @@ -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::Initi 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(); Modified: lldb/trunk/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp?rev=357086&r1=357085&r2=357086&view=diff ============================================================================== --- lldb/trunk/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp (original) +++ lldb/trunk/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp Wed Mar 27 09:23:50 2019 @@ -57,7 +57,6 @@ const char *const LLDB_NT_OWNER_GNU = "G 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 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(con 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 §_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::RefineModuleDetailsFromNo // 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::GetSectionTyp 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) { Modified: lldb/trunk/source/Plugins/Platform/CMakeLists.txt URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/CMakeLists.txt?rev=357086&r1=357085&r2=357086&view=diff ============================================================================== --- lldb/trunk/source/Plugins/Platform/CMakeLists.txt (original) +++ lldb/trunk/source/Plugins/Platform/CMakeLists.txt Wed Mar 27 09:23:50 2019 @@ -14,5 +14,4 @@ add_subdirectory(POSIX) add_subdirectory(gdb-server) -add_subdirectory(Kalimba) add_subdirectory(Android) Modified: lldb/trunk/source/Utility/ArchSpec.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Utility/ArchSpec.cpp?rev=357086&r1=357085&r2=357086&view=diff ============================================================================== --- lldb/trunk/source/Utility/ArchSpec.cpp (original) +++ lldb/trunk/source/Utility/ArchSpec.cpp Wed Mar 27 09:23:50 2019 @@ -214,13 +214,7 @@ static const CoreDefinition g_core_defin 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_a 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() } 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(Architect 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: Modified: lldb/trunk/tools/lldb-test/SystemInitializerTest.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/lldb-test/SystemInitializerTest.cpp?rev=357086&r1=357085&r2=357086&view=diff ============================================================================== --- lldb/trunk/tools/lldb-test/SystemInitializerTest.cpp (original) +++ lldb/trunk/tools/lldb-test/SystemInitializerTest.cpp Wed Mar 27 09:23:50 2019 @@ -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::Initi 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(); _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits