[Lldb-commits] [PATCH] D29581: Initial implementation of SB APIs for Tracing support.
ravitheja updated this revision to Diff 93850. ravitheja added a comment. Changes for review. https://reviews.llvm.org/D29581 Files: include/lldb/API/LLDB.h include/lldb/API/SBDefines.h include/lldb/API/SBError.h include/lldb/API/SBProcess.h include/lldb/API/SBStructuredData.h include/lldb/API/SBTrace.h include/lldb/API/SBTraceOptions.h include/lldb/Core/StructuredDataImpl.h include/lldb/Target/Process.h include/lldb/lldb-enumerations.h include/lldb/lldb-forward.h scripts/interface/SBProcess.i scripts/interface/SBStructuredData.i scripts/interface/SBTrace.i scripts/interface/SBTraceOptions.i scripts/lldb.swig source/API/CMakeLists.txt source/API/SBProcess.cpp source/API/SBStructuredData.cpp source/API/SBTrace.cpp source/API/SBTraceOptions.cpp Index: source/API/SBTraceOptions.cpp === --- /dev/null +++ source/API/SBTraceOptions.cpp @@ -0,0 +1,99 @@ +//===-- SBTraceOptions.cpp --*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===--===// + +#include "lldb/API/SBTraceOptions.h" +#include "lldb/API/SBError.h" +#include "lldb/API/SBStream.h" +#include "lldb/API/SBStructuredData.h" +#include "lldb/Core/Log.h" +#include "lldb/Core/StructuredDataImpl.h" +#include "lldb/Target/Process.h" + +using namespace lldb; +using namespace lldb_private; + +SBTraceOptions::SBTraceOptions(lldb::TraceType type, uint64_t trace_buffer_size, + uint64_t meta_data_buffer_size) { + m_traceoptions_sp.reset( + new TraceOptions(type, trace_buffer_size, meta_data_buffer_size)); +} + +lldb::TraceType SBTraceOptions::getType() const { + if (m_traceoptions_sp) +return m_traceoptions_sp->getType(); + return lldb::TraceType::eTraceTypeNone; +} + +uint64_t SBTraceOptions::getTraceBufferSize() const { + if (m_traceoptions_sp) +return m_traceoptions_sp->getTraceBufferSize(); + return 0; +} + +lldb::SBStructuredData SBTraceOptions::getTraceParams(lldb::SBError &error) { + error.Clear(); + const lldb_private::StructuredData::DictionarySP dict_obj = + m_traceoptions_sp->getTraceParams(); + lldb::SBStructuredData structData; + StructuredDataImplSP struct_data = structData.GetSP(); + if (dict_obj && struct_data) +struct_data->SetObjectSP(dict_obj->shared_from_this()); + else +error.SetErrorString("Empty trace params"); + return structData; +} + +uint64_t SBTraceOptions::getMetaDataBufferSize() const { + if (m_traceoptions_sp) +return m_traceoptions_sp->getTraceBufferSize(); + return 0; +} + +void SBTraceOptions::setTraceParams(lldb::SBStructuredData ¶ms) { + StructuredDataImplSP struct_data_impl = params.GetSP(); + if (m_traceoptions_sp && struct_data_impl) { +StructuredData::ObjectSP obj_sp = struct_data_impl->GetObjectSP(); +if (obj_sp && obj_sp->GetAsDictionary() != nullptr) + m_traceoptions_sp->setTraceParams( + std::static_pointer_cast(obj_sp)); + } + return; +} + +void SBTraceOptions::setType(lldb::TraceType type) { + if (m_traceoptions_sp) +m_traceoptions_sp->setType(type); +} + +void SBTraceOptions::setTraceBufferSize(uint64_t size) { + if (m_traceoptions_sp) +m_traceoptions_sp->setTraceBufferSize(size); +} + +void SBTraceOptions::setMetaDataBufferSize(uint64_t size) { + if (m_traceoptions_sp) +m_traceoptions_sp->setMetaDataBufferSize(size); +} + +bool SBTraceOptions::IsValid() { + if (m_traceoptions_sp) +return true; + return false; +} + +void SBTraceOptions::setThreadID(lldb::tid_t thread_id) { + if (m_traceoptions_sp) +m_traceoptions_sp->setThreadID(thread_id); +} + +lldb::tid_t SBTraceOptions::getThreadID() { + if (m_traceoptions_sp) +return m_traceoptions_sp->getThreadID(); + return LLDB_INVALID_THREAD_ID; +} Index: source/API/SBTrace.cpp === --- /dev/null +++ source/API/SBTrace.cpp @@ -0,0 +1,109 @@ +//===-- SBTrace.cpp -*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===--===// + +#include "lldb/Core/Log.h" +#include "lldb/Target/Process.h" + +#include "lldb/API/SBTrace.h" +#include "lldb/API/SBTraceOptions.h" + +using namespace lldb; +using namespace lldb_private; + +class TraceImpl { +public: + lldb::user_id_t uid; +}; + +lldb::ProcessSP SBTrace::GetSP() const { return m_opaque_wp.lock(); } + +size_t SBTrace::GetTraceData(SBError &error, void *buf, size_t size, + size_t offset, lldb::tid_t
[Lldb-commits] [lldb] r299374 - New C++ function name parsing logic
Author: eugene Date: Mon Apr 3 13:59:34 2017 New Revision: 299374 URL: http://llvm.org/viewvc/llvm-project?rev=299374&view=rev Log: New C++ function name parsing logic Current implementation of CPlusPlusLanguage::MethodName::Parse() doesn't get anywhere close to covering full extent of possible function declarations. It causes incorrect behavior in avoid-stepping and sometimes messes printing of thread backtrace. This change implements more methodical parsing logic based on clang lexer and simple recursive parser. Examples: void std::vector>::_M_emplace_back_aux(Class const&) void (*&std::_Any_data::_M_access())() Differential Revision: https://reviews.llvm.org/D31451 Added: lldb/trunk/source/Plugins/Language/CPlusPlus/CPlusPlusNameParser.cpp lldb/trunk/source/Plugins/Language/CPlusPlus/CPlusPlusNameParser.h Modified: lldb/trunk/source/Plugins/Language/CPlusPlus/CMakeLists.txt lldb/trunk/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.cpp lldb/trunk/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.h lldb/trunk/unittests/Language/CPlusPlus/CPlusPlusLanguageTest.cpp Modified: lldb/trunk/source/Plugins/Language/CPlusPlus/CMakeLists.txt URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Language/CPlusPlus/CMakeLists.txt?rev=299374&r1=299373&r2=299374&view=diff == --- lldb/trunk/source/Plugins/Language/CPlusPlus/CMakeLists.txt (original) +++ lldb/trunk/source/Plugins/Language/CPlusPlus/CMakeLists.txt Mon Apr 3 13:59:34 2017 @@ -1,6 +1,7 @@ add_lldb_library(lldbPluginCPlusPlusLanguage PLUGIN BlockPointer.cpp CPlusPlusLanguage.cpp + CPlusPlusNameParser.cpp CxxStringTypes.cpp LibCxx.cpp LibCxxAtomic.cpp Modified: lldb/trunk/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.cpp?rev=299374&r1=299373&r2=299374&view=diff == --- lldb/trunk/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.cpp (original) +++ lldb/trunk/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.cpp Mon Apr 3 13:59:34 2017 @@ -21,7 +21,6 @@ // Other libraries and framework includes #include "llvm/ADT/StringRef.h" -#include "llvm/Support/Threading.h" // Project includes #include "lldb/Core/PluginManager.h" @@ -36,6 +35,7 @@ #include "lldb/Utility/RegularExpression.h" #include "BlockPointer.h" +#include "CPlusPlusNameParser.h" #include "CxxStringTypes.h" #include "LibCxx.h" #include "LibCxxAtomic.h" @@ -85,15 +85,14 @@ void CPlusPlusLanguage::MethodName::Clea m_context = llvm::StringRef(); m_arguments = llvm::StringRef(); m_qualifiers = llvm::StringRef(); - m_type = eTypeInvalid; m_parsed = false; m_parse_error = false; } -bool ReverseFindMatchingChars(const llvm::StringRef &s, - const llvm::StringRef &left_right_chars, - size_t &left_pos, size_t &right_pos, - size_t pos = llvm::StringRef::npos) { +static bool ReverseFindMatchingChars(const llvm::StringRef &s, + const llvm::StringRef &left_right_chars, + size_t &left_pos, size_t &right_pos, + size_t pos = llvm::StringRef::npos) { assert(left_right_chars.size() == 2); left_pos = llvm::StringRef::npos; const char left_char = left_right_chars[0]; @@ -119,10 +118,9 @@ bool ReverseFindMatchingChars(const llvm return false; } -static bool IsValidBasename(const llvm::StringRef &basename) { - // Check that the basename matches with the following regular expression or is - // an operator name: - // "^~?([A-Za-z_][A-Za-z_0-9]*)(<.*>)?$" +static bool IsTrivialBasename(const llvm::StringRef &basename) { + // Check that the basename matches with the following regular expression + // "^~?([A-Za-z_][A-Za-z_0-9]*)$" // We are using a hand written implementation because it is significantly more // efficient then // using the general purpose regular expression library. @@ -149,100 +147,69 @@ static bool IsValidBasename(const llvm:: if (idx == basename.size()) return true; - // Check for basename with template arguments - // TODO: Improve the quality of the validation with validating the template - // arguments - if (basename[idx] == '<' && basename.back() == '>') -return true; + return false; +} - // Check if the basename is a vaild C++ operator name - if (!basename.startswith("operator")) -return false; +bool CPlusPlusLanguage::MethodName::TrySimplifiedParse() { + // This method tries to parse simple method definitions + // which are presumably most comman in user programs. + // Definitions that can be parsed by this function don't have return types + // and templates in the name. + // A::B
[Lldb-commits] [PATCH] D31451: New C++ function name parsing logic
This revision was automatically updated to reflect the committed changes. Closed by commit rL299374: New C++ function name parsing logic (authored by eugene). Changed prior to commit: https://reviews.llvm.org/D31451?vs=93694&id=93910#toc Repository: rL LLVM https://reviews.llvm.org/D31451 Files: lldb/trunk/source/Plugins/Language/CPlusPlus/CMakeLists.txt lldb/trunk/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.cpp lldb/trunk/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.h lldb/trunk/source/Plugins/Language/CPlusPlus/CPlusPlusNameParser.cpp lldb/trunk/source/Plugins/Language/CPlusPlus/CPlusPlusNameParser.h lldb/trunk/unittests/Language/CPlusPlus/CPlusPlusLanguageTest.cpp Index: lldb/trunk/unittests/Language/CPlusPlus/CPlusPlusLanguageTest.cpp === --- lldb/trunk/unittests/Language/CPlusPlus/CPlusPlusLanguageTest.cpp +++ lldb/trunk/unittests/Language/CPlusPlus/CPlusPlusLanguageTest.cpp @@ -6,35 +6,139 @@ // License. See LICENSE.TXT for details. // //===--===// - #include "gtest/gtest.h" #include "Plugins/Language/CPlusPlus/CPlusPlusLanguage.h" using namespace lldb_private; -TEST(CPlusPlusLanguage, MethodName) { +TEST(CPlusPlusLanguage, MethodNameParsing) { struct TestCase { std::string input; std::string context, basename, arguments, qualifiers, scope_qualified_name; }; TestCase test_cases[] = { - {"foo::bar(baz)", "foo", "bar", "(baz)", "", "foo::bar"}, + {"main(int, char *[]) ", "", "main", "(int, char *[])", "", "main"}, + {"foo::bar(baz) const", "foo", "bar", "(baz)", "const", "foo::bar"}, + {"foo::~bar(baz)", "foo", "~bar", "(baz)", "", "foo::~bar"}, + {"a::b::c::d(e,f)", "a::b::c", "d", "(e,f)", "", "a::b::c::d"}, + {"void f(int)", "", "f", "(int)", "", "f"}, + + // Operators {"std::basic_ostream >& " "std::operator<< >" "(std::basic_ostream >&, char const*)", "std", "operator<< >", "(std::basic_ostream >&, char const*)", "", - "std::operator<< >"}}; + "std::operator<< >"}, + {"operator delete[](void*, clang::ASTContext const&, unsigned long)", "", + "operator delete[]", "(void*, clang::ASTContext const&, unsigned long)", + "", "operator delete[]"}, + {"llvm::Optional::operator bool() const", + "llvm::Optional", "operator bool", "()", "const", + "llvm::Optional::operator bool"}, + {"(anonymous namespace)::FactManager::operator[](unsigned short)", + "(anonymous namespace)::FactManager", "operator[]", "(unsigned short)", + "", "(anonymous namespace)::FactManager::operator[]"}, + {"const int& std::map>::operator[](short) const", + "std::map>", "operator[]", "(short)", "const", + "std::map>::operator[]"}, + {"CompareInsn::operator()(llvm::StringRef, InsnMatchEntry const&)", + "CompareInsn", "operator()", "(llvm::StringRef, InsnMatchEntry const&)", + "", "CompareInsn::operator()"}, + {"llvm::Optional::operator*() const &", + "llvm::Optional", "operator*", "()", "const &", + "llvm::Optional::operator*"}, + // Internal classes + {"operator<<(Cls, Cls)::Subclass::function()", + "operator<<(Cls, Cls)::Subclass", "function", "()", "", + "operator<<(Cls, Cls)::Subclass::function"}, + {"SAEC::checkFunction(context&) const::CallBack::CallBack(int)", + "SAEC::checkFunction(context&) const::CallBack", "CallBack", "(int)", "", + "SAEC::checkFunction(context&) const::CallBack::CallBack"}, + // Anonymous namespace + {"XX::(anonymous namespace)::anon_class::anon_func() const", + "XX::(anonymous namespace)::anon_class", "anon_func", "()", "const", + "XX::(anonymous namespace)::anon_class::anon_func"}, + + // Function pointers + {"string (*f(vector&&))(float)", "", "f", "(vector&&)", "", + "f"}, + {"void (*&std::_Any_data::_M_access())()", "std::_Any_data", + "_M_access", "()", "", + "std::_Any_data::_M_access"}, + {"void (*(*(*(*(*(*(*(* const&func1(int))())())())())())())())()", "", + "func1", "(int)", "", "func1"}, + + // Templates + {"void llvm::PM>::" + "addPass(llvm::VP)", + "llvm::PM>", "addPass", + "(llvm::VP)", "", + "llvm::PM>::" + "addPass"}, + {"void std::vector >" + "::_M_emplace_back_aux(Class const&)", + "std::vector >", + "_M_emplace_back_aux", "(Class const&)", "", + "std::vector >::" + "_M_emplace_back_aux"}, + {"unsigned long llvm::countTrailingOnes" + "(unsigned int, llvm::ZeroBehavior)", + "llvm", "countTrailingOnes", + "(unsigned int, llvm::ZeroBehavior)", "", + "llvm::countTrailingOnes"}, + {"std::enable_if<(10u)<(64), bool>::type llvm::isUInt<10u>(unsigned " + "long)", + "llvm", "isUInt<10u>", "(uns
[Lldb-commits] [PATCH] D31367: Expression: add missing linkage to RuntimeDyld component
beanz added a subscriber: lhames. beanz added a comment. @mgorny, because of differences in linker semantics between Darwin and ELF, I can't reproduce the failure you have locally. I think that the patch below works around it in a more-portable way. I've engaged with @lhames about an architectural solution to the problem, because I think we do need to change how the ExecutionEngine sub-libraries are intertwined, but that is a longer-term problem. Can you please test this patch and see if it resolves your problem? diff --git a/cmake/modules/AddLLVM.cmake b/cmake/modules/AddLLVM.cmake index 7f7608cff33..1f27517c2df 100644 --- a/cmake/modules/AddLLVM.cmake +++ b/cmake/modules/AddLLVM.cmake @@ -342,7 +342,7 @@ endfunction(set_windows_version_resource_properties) function(llvm_add_library name) cmake_parse_arguments(ARG "MODULE;SHARED;STATIC;OBJECT;DISABLE_LLVM_LINK_LLVM_DYLIB;SONAME" -"OUTPUT_NAME;PLUGIN_TOOL" +"OUTPUT_NAME;PLUGIN_TOOL;DEPENDENCY_LINK_TYPE" "ADDITIONAL_HEADERS;DEPENDS;LINK_COMPONENTS;LINK_LIBS;OBJLIBS" ${ARGN}) list(APPEND LLVM_COMMON_DEPENDS ${ARG_DEPENDS}) @@ -520,14 +520,16 @@ function(llvm_add_library name) get_property(lib_deps GLOBAL PROPERTY LLVMBUILD_LIB_DEPS_${name}) endif() - if(ARG_STATIC) -set(libtype INTERFACE) - else() -# We can use PRIVATE since SO knows its dependent libs. -set(libtype PRIVATE) + if(NOT ARG_DEPENDENCY_LINK_TYPE) +if(ARG_STATIC) + set(ARG_DEPENDENCY_LINK_TYPE INTERFACE) +else() + # We can use PRIVATE since SO knows its dependent libs. + set(ARG_DEPENDENCY_LINK_TYPE PRIVATE) +endif() endif() - target_link_libraries(${name} ${libtype} + target_link_libraries(${name} ${ARG_DEPENDENCY_LINK_TYPE} ${ARG_LINK_LIBS} ${lib_deps} ${llvm_libs} diff --git a/lib/ExecutionEngine/CMakeLists.txt b/lib/ExecutionEngine/CMakeLists.txt index 2d9337bbefd..37a57eeaa79 100644 --- a/lib/ExecutionEngine/CMakeLists.txt +++ b/lib/ExecutionEngine/CMakeLists.txt @@ -1,4 +1,9 @@ - +# Execution engine is not neat and contained like other LLVM libraries. To work +# around this if BUILD_SHARED_LIBS is set we need to force the linkage type of +# LLVMExecutionEngine's dependencies to PUBLIC. +if(BUILD_SHARED_LIBS) + set(dependency_hack DEPENDENCY_LINK_TYPE PUBLIC) +endif() add_llvm_library(LLVMExecutionEngine ExecutionEngine.cpp @@ -12,6 +17,7 @@ add_llvm_library(LLVMExecutionEngine DEPENDS intrinsics_gen + ${dependency_hack} ) add_subdirectory(Interpreter) Repository: rL LLVM https://reviews.llvm.org/D31367 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r299394 - The LIBLLDB_LOG_TEMPORARY channel got lost at some point where
Author: jmolenda Date: Mon Apr 3 17:23:01 2017 New Revision: 299394 URL: http://llvm.org/viewvc/llvm-project?rev=299394&view=rev Log: The LIBLLDB_LOG_TEMPORARY channel got lost at some point where Logging.cpp was being changed in the past. Re-add it. Modified: lldb/trunk/include/lldb/Utility/Logging.h lldb/trunk/source/Utility/Logging.cpp Modified: lldb/trunk/include/lldb/Utility/Logging.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Utility/Logging.h?rev=299394&r1=299393&r2=299394&view=diff == --- lldb/trunk/include/lldb/Utility/Logging.h (original) +++ lldb/trunk/include/lldb/Utility/Logging.h Mon Apr 3 17:23:01 2017 @@ -23,6 +23,7 @@ #define LIBLLDB_LOG_WATCHPOINTS (1u << 6) #define LIBLLDB_LOG_STEP (1u << 7) #define LIBLLDB_LOG_EXPRESSIONS (1u << 8) +#define LIBLLDB_LOG_TEMPORARY (1u << 9) #define LIBLLDB_LOG_STATE (1u << 10) #define LIBLLDB_LOG_OBJECT (1u << 11) #define LIBLLDB_LOG_COMMUNICATION (1u << 12) Modified: lldb/trunk/source/Utility/Logging.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Utility/Logging.cpp?rev=299394&r1=299393&r2=299394&view=diff == --- lldb/trunk/source/Utility/Logging.cpp (original) +++ lldb/trunk/source/Utility/Logging.cpp Mon Apr 3 17:23:01 2017 @@ -38,6 +38,7 @@ static constexpr Log::Category g_categor {{"symbol"}, {"log symbol related issues and warnings"}, LIBLLDB_LOG_SYMBOLS}, {{"system-runtime"}, {"log system runtime events"}, LIBLLDB_LOG_SYSTEM_RUNTIME}, {{"target"}, {"log target events and activities"}, LIBLLDB_LOG_TARGET}, + {{"temp"}, {"log internal temporary debug messages"}, LIBLLDB_LOG_TEMPORARY}, {{"thread"}, {"log thread events and activities"}, LIBLLDB_LOG_THREAD}, {{"types"}, {"log type system related activities"}, LIBLLDB_LOG_TYPES}, {{"unwind"}, {"log stack unwind activities"}, LIBLLDB_LOG_UNWIND}, ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r299402 - Add CPlusPlusNameParser to the xcodeproj
Author: spyffe Date: Mon Apr 3 18:56:41 2017 New Revision: 299402 URL: http://llvm.org/viewvc/llvm-project?rev=299402&view=rev Log: Add CPlusPlusNameParser to the xcodeproj Modified: lldb/trunk/lldb.xcodeproj/project.pbxproj Modified: lldb/trunk/lldb.xcodeproj/project.pbxproj URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/lldb.xcodeproj/project.pbxproj?rev=299402&r1=299401&r2=299402&view=diff == --- lldb/trunk/lldb.xcodeproj/project.pbxproj (original) +++ lldb/trunk/lldb.xcodeproj/project.pbxproj Mon Apr 3 18:56:41 2017 @@ -712,6 +712,7 @@ 49DCF702170E70120092F75E /* Materializer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 49DCF700170E70120092F75E /* Materializer.cpp */; }; 49DEF1251CD7C6DF006A7C7D /* BlockPointer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 49DEF11F1CD7BD90006A7C7D /* BlockPointer.cpp */; }; 49E4F66B1C9CAD16008487EA /* DiagnosticManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 49E4F6681C9CAD12008487EA /* DiagnosticManager.cpp */; }; + 49F811F31E931B2100F4E163 /* CPlusPlusNameParser.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 49F811EF1E931B1500F4E163 /* CPlusPlusNameParser.cpp */; }; 4C0083401B9F9BA900D5CF24 /* UtilityFunction.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C00833F1B9F9BA900D5CF24 /* UtilityFunction.cpp */; }; 4C2479BD1BA39295009C9A7B /* FunctionCaller.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C0083321B9A5DE200D5CF24 /* FunctionCaller.cpp */; }; 4C3ADCD61810D88B00357218 /* BreakpointResolverFileRegex.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4CAA56141422D986001FFA01 /* BreakpointResolverFileRegex.cpp */; }; @@ -2474,6 +2475,8 @@ 49EC3E9C118F90D400B1265E /* ThreadPlanCallFunction.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ThreadPlanCallFunction.h; path = include/lldb/Target/ThreadPlanCallFunction.h; sourceTree = ""; }; 49F1A74511B3388F003ED505 /* ClangExpressionDeclMap.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ClangExpressionDeclMap.cpp; path = ExpressionParser/Clang/ClangExpressionDeclMap.cpp; sourceTree = ""; }; 49F1A74911B338AE003ED505 /* ClangExpressionDeclMap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ClangExpressionDeclMap.h; path = ExpressionParser/Clang/ClangExpressionDeclMap.h; sourceTree = ""; }; + 49F811EF1E931B1500F4E163 /* CPlusPlusNameParser.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CPlusPlusNameParser.cpp; path = Language/CPlusPlus/CPlusPlusNameParser.cpp; sourceTree = ""; }; + 49F811F01E931B1500F4E163 /* CPlusPlusNameParser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CPlusPlusNameParser.h; path = Language/CPlusPlus/CPlusPlusNameParser.h; sourceTree = ""; }; 4C00832C1B9A58A700D5CF24 /* Expression.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Expression.h; path = include/lldb/Expression/Expression.h; sourceTree = ""; }; 4C00832D1B9A58A700D5CF24 /* FunctionCaller.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = FunctionCaller.h; path = include/lldb/Expression/FunctionCaller.h; sourceTree = ""; }; 4C00832E1B9A58A700D5CF24 /* UserExpression.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = UserExpression.h; path = include/lldb/Expression/UserExpression.h; sourceTree = ""; }; @@ -6108,6 +6111,8 @@ 945261B01B9A11BE00BF138D /* Formatters */, 94B6385C1B8FB174004FE1E4 /* CPlusPlusLanguage.h */, 94B6385B1B8FB174004FE1E4 /* CPlusPlusLanguage.cpp */, + 49F811F01E931B1500F4E163 /* CPlusPlusNameParser.h */, + 49F811EF1E931B1500F4E163 /* CPlusPlusNameParser.cpp */, ); name = CPlusPlus; sourceTree = ""; @@ -7077,6 +7082,7 @@ 2689FFF713353DB600698AC0 /* BreakpointLocation.cpp in Sources */, 2654A68D1E552D1500DA1013 /* PseudoTerminal.cpp in Sources */, 2689FFF913353DB600698AC0 /* BreakpointLocationCollection.cpp in Sources */, + 49F811F31E931B2100F4E163 /* CPlusPlusNameParser.cpp in Sources */, 2689FFFB13353DB600698AC0 /* BreakpointLocationList.cpp in Sources */,
[Lldb-commits] [lldb] r299408 - Skip three test cases that are asserting on macosx as of r299199. A quick
Author: jmolenda Date: Mon Apr 3 20:09:20 2017 New Revision: 299408 URL: http://llvm.org/viewvc/llvm-project?rev=299408&view=rev Log: Skip three test cases that are asserting on macosx as of r299199. A quick look showed that the target's arch has no core / byte order and so when AuxVector::AuxVector calls into a dataextractor and sets the byte size to 0, it asserts. e.g. m_arch = { m_triple = (Data = "x86_64--linux", Arch = x86_64, SubArch = NoSubArch, Vendor = UnknownVendor, OS = Linux, Environment = UnknownEnvironment, ObjectFormat = ELF) m_core = kCore_invalid m_byte_order = eByteOrderInvalid m_flags = 0x m_distribution_id = } Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/elf-core/TestLinuxCore.py lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/elf-core/gcore/TestGCore.py lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/elf-core/thread_crash/TestLinuxCoreThreads.py Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/elf-core/TestLinuxCore.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/elf-core/TestLinuxCore.py?rev=299408&r1=299407&r2=299408&view=diff == --- lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/elf-core/TestLinuxCore.py (original) +++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/elf-core/TestLinuxCore.py Mon Apr 3 20:09:20 2017 @@ -39,6 +39,7 @@ class LinuxCoreTestCase(TestBase): super(LinuxCoreTestCase, self).tearDown() @skipIf(oslist=['windows']) +@skipIfDarwin # , fails started happening with r299199 @skipIf(triple='^mips') def test_i386(self): """Test that lldb can read the process information from an i386 linux core file.""" @@ -57,18 +58,21 @@ class LinuxCoreTestCase(TestBase): self.do_test("linux-mips64el-gnuabi64", self._mips64_n64_pid, self._mips_regions) @skipIf(oslist=['windows']) +@skipIfDarwin # , fails started happening with r299199 @skipIf(triple='^mips') def test_x86_64(self): """Test that lldb can read the process information from an x86_64 linux core file.""" self.do_test("linux-x86_64", self._x86_64_pid, self._x86_64_regions) @skipIf(oslist=['windows']) +@skipIfDarwin # , fails started happening with r299199 @skipIf(triple='^mips') def test_s390x(self): """Test that lldb can read the process information from an s390x linux core file.""" self.do_test("linux-s390x", self._s390x_pid, self._s390x_regions) @skipIf(oslist=['windows']) +@skipIfDarwin # , fails started happening with r299199 @skipIf(triple='^mips') def test_same_pid_running(self): """Test that we read the information from the core correctly even if we have a running @@ -98,6 +102,7 @@ class LinuxCoreTestCase(TestBase): self.RemoveTempFile("linux-x86_64-pid.core") @skipIf(oslist=['windows']) +@skipIfDarwin # , fails started happening with r299199 @skipIf(triple='^mips') def test_two_cores_same_pid(self): """Test that we handle the situation if we have two core files with the same PID @@ -127,6 +132,7 @@ class LinuxCoreTestCase(TestBase): self.do_test("linux-x86_64", self._x86_64_pid, self._x86_64_regions) @skipIf(oslist=['windows']) +@skipIfDarwin # , fails started happening with r299199 @skipIf(triple='^mips') def test_FPR_SSE(self): # check x86_64 core file Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/elf-core/gcore/TestGCore.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/elf-core/gcore/TestGCore.py?rev=299408&r1=299407&r2=299408&view=diff == --- lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/elf-core/gcore/TestGCore.py (original) +++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/elf-core/gcore/TestGCore.py Mon Apr 3 20:09:20 2017 @@ -23,12 +23,14 @@ class GCoreTestCase(TestBase): _x86_64_pid = 5669 @skipIf(oslist=['windows']) +@skipIfDarwin # , fails started happening with r299199 @skipIf(triple='^mips') def test_i386(self): """Test that lldb can read the process information from an i386 linux core file.""" self.do_test("linux-i386", self._i386_pid) @skipIf(oslist=['windows']) +@skipIfDarwin # , fails started happening with r299199 @skipIf(triple='^mips') def test_x86_64(self): """Test that lldb can read the process information from an x86_64 linux core file.""" Modified: lldb/trunk/packages/Python/lldbsuite/test/func