[Lldb-commits] [lldb] r286101 - Make space for FreeBSD core file tests
Author: labath Date: Mon Nov 7 03:58:58 2016 New Revision: 286101 URL: http://llvm.org/viewvc/llvm-project?rev=286101&view=rev Log: Make space for FreeBSD core file tests This renames the functionalities/postmortem/linux-core to elf-core and puts the "linux" part into the individual names of the core files. Since the tests for linux and freebsd core files are going to be very similar, having them close together means they can reuse most of the plumbing. Added: lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/elf-core/ lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/elf-core/TestLinuxCore.py - copied, changed from r286093, lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/linux-core/TestLinuxCore.py lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/elf-core/altmain.c - copied, changed from r286093, lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/linux-core/altmain.c lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/elf-core/altmain.core - copied, changed from r286093, lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/linux-core/altmain.core lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/elf-core/altmain.out - copied, changed from r286093, lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/linux-core/altmain.out lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/elf-core/linux-i386.core - copied, changed from r286093, lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/linux-core/i386.core lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/elf-core/linux-i386.out - copied, changed from r286093, lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/linux-core/i386.out lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/elf-core/linux-s390x.core - copied, changed from r286093, lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/linux-core/s390x.core lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/elf-core/linux-s390x.out - copied, changed from r286093, lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/linux-core/s390x.out lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/elf-core/linux-x86_64.core - copied, changed from r286093, lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/linux-core/x86_64.core lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/elf-core/linux-x86_64.out - copied, changed from r286093, lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/linux-core/x86_64.out lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/elf-core/main.c - copied, changed from r286093, lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/linux-core/main.c lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/elf-core/make-core.sh - copied, changed from r286093, lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/linux-core/make-core.sh Removed: lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/linux-core/TestLinuxCore.py lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/linux-core/altmain.c lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/linux-core/altmain.core lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/linux-core/altmain.out lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/linux-core/i386.core lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/linux-core/i386.out lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/linux-core/main.c lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/linux-core/make-core.sh lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/linux-core/s390x.core lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/linux-core/s390x.out lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/linux-core/x86_64.core lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/linux-core/x86_64.out Copied: lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/elf-core/TestLinuxCore.py (from r286093, lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/linux-core/TestLinuxCore.py) URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/elf-core/TestLinuxCore.py?p2=lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/elf-core/TestLinuxCore.py&p1=lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/linux-core/TestLinuxCore.
[Lldb-commits] [PATCH] D26300: ELF core: Adding parsing of the floating-point and SSE registers on x86 32/64 bit elf core files
labath added a comment. I've renamed to folder into elf-core and put "linux" into the individual file names. I did not rename `TestLinuxCore.py` as I am still not sure what to do about it -- if we end up having a lot of these tests, we may want a separate `TestFreeBSDCore.py`, with the common code refactored into a base class. I think you should be able to add a basic freebsd core file test, based on the existing main.c. We'll refactor this change after that (PS: Dimitar's internship is over, so I may end up taking this over). Comment at: packages/Python/lldbsuite/test/functionalities/postmortem/linux-core/TestLinuxCore.py:107 +@skipIf(oslist=['windows']) +@skipIf(triple='^mips') emaste wrote: > Curious, why are these skipped only on windows? My guess would be that we fail to select the correct platform instance when opening the core there, so we end up trying to debug a linux core file with PlatformWindows, or something like that. I'll need to look into that at some point. https://reviews.llvm.org/D26300 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D26338: [lldb] Don't build unit tests for unsupported targets
Why not? Just because llvm isn't building support for targeting some architecture doesn't mean lldb shouldn't be able to debug those architectures. We could add a similar LLDB specific define, but using llvm's seems wrong On Sun, Nov 6, 2016 at 6:13 PM Vedant Kumar via lldb-commits < lldb-commits@lists.llvm.org> wrote: > vsk created this revision. > vsk added a reviewer: jasonmolenda. > vsk added a subscriber: lldb-commits. > Herald added a subscriber: mgorny. > > Should fix: https://llvm.org/bugs/show_bug.cgi?id=30928 > > > https://reviews.llvm.org/D26338 > > Files: > unittests/UnwindAssembly/CMakeLists.txt > unittests/UnwindAssembly/InstEmulation/CMakeLists.txt > > > Index: unittests/UnwindAssembly/InstEmulation/CMakeLists.txt > === > --- unittests/UnwindAssembly/InstEmulation/CMakeLists.txt > +++ unittests/UnwindAssembly/InstEmulation/CMakeLists.txt > @@ -1 +1,3 @@ > -add_lldb_unittest(InstEmulationTests TestArm64InstEmulation.cpp) > +if ("AArch64" IN_LIST LLVM_TARGETS_TO_BUILD) > + add_lldb_unittest(InstEmulationTests TestArm64InstEmulation.cpp) > +endif() > Index: unittests/UnwindAssembly/CMakeLists.txt > === > --- unittests/UnwindAssembly/CMakeLists.txt > +++ unittests/UnwindAssembly/CMakeLists.txt > @@ -1,2 +1,5 @@ > -add_subdirectory(x86) > +if ("X86" IN_LIST LLVM_TARGETS_TO_BUILD) > + add_subdirectory(x86) > +endif() > + > add_subdirectory(InstEmulation) > > > ___ > lldb-commits mailing list > lldb-commits@lists.llvm.org > http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits > ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r286116 - Fix an issue where LLDB would hang trying to launch tvOS simulator binaries
Author: enrico Date: Mon Nov 7 10:25:01 2016 New Revision: 286116 URL: http://llvm.org/viewvc/llvm-project?rev=286116&view=rev Log: Fix an issue where LLDB would hang trying to launch tvOS simulator binaries Modified: lldb/trunk/source/Plugins/Platform/MacOSX/PlatformAppleTVSimulator.cpp lldb/trunk/source/Plugins/Platform/MacOSX/PlatformAppleTVSimulator.h Modified: lldb/trunk/source/Plugins/Platform/MacOSX/PlatformAppleTVSimulator.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/MacOSX/PlatformAppleTVSimulator.cpp?rev=286116&r1=286115&r2=286116&view=diff == --- lldb/trunk/source/Plugins/Platform/MacOSX/PlatformAppleTVSimulator.cpp (original) +++ lldb/trunk/source/Plugins/Platform/MacOSX/PlatformAppleTVSimulator.cpp Mon Nov 7 10:25:01 2016 @@ -150,7 +150,7 @@ const char *PlatformAppleTVSimulator::Ge /// Default Constructor //-- PlatformAppleTVSimulator::PlatformAppleTVSimulator() -: PlatformDarwin(true), m_sdk_directory() {} +: PlatformDarwin(true), m_sdk_dir_mutex(), m_sdk_directory() {} //-- /// Destructor. @@ -261,7 +261,7 @@ EnumerateDirectoryCallback(void *baton, } const char *PlatformAppleTVSimulator::GetSDKDirectoryAsCString() { - std::lock_guard guard(m_mutex); + std::lock_guard guard(m_sdk_dir_mutex); if (m_sdk_directory.empty()) { const char *developer_dir = GetDeveloperDirectory(); if (developer_dir) { Modified: lldb/trunk/source/Plugins/Platform/MacOSX/PlatformAppleTVSimulator.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/MacOSX/PlatformAppleTVSimulator.h?rev=286116&r1=286115&r2=286116&view=diff == --- lldb/trunk/source/Plugins/Platform/MacOSX/PlatformAppleTVSimulator.h (original) +++ lldb/trunk/source/Plugins/Platform/MacOSX/PlatformAppleTVSimulator.h Mon Nov 7 10:25:01 2016 @@ -86,6 +86,7 @@ public: } protected: + std::mutex m_sdk_dir_mutex; std::string m_sdk_directory; std::string m_build_update; ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D26338: [lldb] Don't build unit tests for unsupported targets
The problem is that if we reuse the LLVM disassembler (I am not sure if we do it in TestArm64InstEmulation or not but we definitely should) then we need LLVM to be build with support for that specific architecture as otherwise the assembly analysis based unwinding test won't work. On Mon, Nov 7, 2016 at 4:21 PM Zachary Turner via lldb-commits < lldb-commits@lists.llvm.org> wrote: > Why not? Just because llvm isn't building support for targeting some > architecture doesn't mean lldb shouldn't be able to debug those > architectures. We could add a similar LLDB specific define, but using > llvm's seems wrong > On Sun, Nov 6, 2016 at 6:13 PM Vedant Kumar via lldb-commits < > lldb-commits@lists.llvm.org> wrote: > > vsk created this revision. > vsk added a reviewer: jasonmolenda. > vsk added a subscriber: lldb-commits. > Herald added a subscriber: mgorny. > > Should fix: https://llvm.org/bugs/show_bug.cgi?id=30928 > > > https://reviews.llvm.org/D26338 > > Files: > unittests/UnwindAssembly/CMakeLists.txt > unittests/UnwindAssembly/InstEmulation/CMakeLists.txt > > > Index: unittests/UnwindAssembly/InstEmulation/CMakeLists.txt > === > --- unittests/UnwindAssembly/InstEmulation/CMakeLists.txt > +++ unittests/UnwindAssembly/InstEmulation/CMakeLists.txt > @@ -1 +1,3 @@ > -add_lldb_unittest(InstEmulationTests TestArm64InstEmulation.cpp) > +if ("AArch64" IN_LIST LLVM_TARGETS_TO_BUILD) > + add_lldb_unittest(InstEmulationTests TestArm64InstEmulation.cpp) > +endif() > Index: unittests/UnwindAssembly/CMakeLists.txt > === > --- unittests/UnwindAssembly/CMakeLists.txt > +++ unittests/UnwindAssembly/CMakeLists.txt > @@ -1,2 +1,5 @@ > -add_subdirectory(x86) > +if ("X86" IN_LIST LLVM_TARGETS_TO_BUILD) > + add_subdirectory(x86) > +endif() > + > add_subdirectory(InstEmulation) > > > ___ > lldb-commits mailing list > lldb-commits@lists.llvm.org > http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits > > ___ > lldb-commits mailing list > lldb-commits@lists.llvm.org > http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits > ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [PATCH] D26275: Remove TimeValue usage from Core/Module
clayborg added a comment. It would be great if we can match the old format somehow. It is definitely clearer. If we can't, don't worry about it too much as it isn't shown by default. Hopefully no one is text scraping. https://reviews.llvm.org/D26275 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D26338: [lldb] Don't build unit tests for unsupported targets
> On Nov 7, 2016, at 8:20 AM, Zachary Turner wrote: > > Why not? It breaks my build. If the right solution is to fix the unit test, we should advertise somewhere that '-DLLVM_TARGETS_TO_BUILD=X86' is temporarily broken and drop this patch. I'd volunteer to put something like that in place. > Just because llvm isn't building support for targeting some architecture > doesn't mean lldb shouldn't be able to debug those architectures. We could > add a similar LLDB specific define, but using llvm's seems wrong Given 'LLVM_TARGETS_TO_BUILD', how do I define 'LLDB_SUPPORTED_TARGETS'? Do you know of an existing define I can use? thanks, vedant > > On Sun, Nov 6, 2016 at 6:13 PM Vedant Kumar via lldb-commits > wrote: > vsk created this revision. > vsk added a reviewer: jasonmolenda. > vsk added a subscriber: lldb-commits. > Herald added a subscriber: mgorny. > > Should fix: https://llvm.org/bugs/show_bug.cgi?id=30928 > > > https://reviews.llvm.org/D26338 > > Files: > unittests/UnwindAssembly/CMakeLists.txt > unittests/UnwindAssembly/InstEmulation/CMakeLists.txt > > > Index: unittests/UnwindAssembly/InstEmulation/CMakeLists.txt > === > --- unittests/UnwindAssembly/InstEmulation/CMakeLists.txt > +++ unittests/UnwindAssembly/InstEmulation/CMakeLists.txt > @@ -1 +1,3 @@ > -add_lldb_unittest(InstEmulationTests TestArm64InstEmulation.cpp) > +if ("AArch64" IN_LIST LLVM_TARGETS_TO_BUILD) > + add_lldb_unittest(InstEmulationTests TestArm64InstEmulation.cpp) > +endif() > Index: unittests/UnwindAssembly/CMakeLists.txt > === > --- unittests/UnwindAssembly/CMakeLists.txt > +++ unittests/UnwindAssembly/CMakeLists.txt > @@ -1,2 +1,5 @@ > -add_subdirectory(x86) > +if ("X86" IN_LIST LLVM_TARGETS_TO_BUILD) > + add_subdirectory(x86) > +endif() > + > add_subdirectory(InstEmulation) > > > ___ > lldb-commits mailing list > lldb-commits@lists.llvm.org > http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D26338: [lldb] Don't build unit tests for unsupported targets
Just to be clear, if the unit test depends on functionality that isn't present when this target isn't defined, then your original patch sounds correct. On Mon, Nov 7, 2016 at 11:06 AM Vedant Kumar wrote: > > > On Nov 7, 2016, at 8:20 AM, Zachary Turner wrote: > > > > Why not? > > It breaks my build. > > If the right solution is to fix the unit test, we should advertise > somewhere > that '-DLLVM_TARGETS_TO_BUILD=X86' is temporarily broken and drop this > patch. > I'd volunteer to put something like that in place. > > > > Just because llvm isn't building support for targeting some architecture > doesn't mean lldb shouldn't be able to debug those architectures. We could > add a similar LLDB specific define, but using llvm's seems wrong > > Given 'LLVM_TARGETS_TO_BUILD', how do I define 'LLDB_SUPPORTED_TARGETS'? > > Do you know of an existing define I can use? > > thanks, > vedant > > > > > On Sun, Nov 6, 2016 at 6:13 PM Vedant Kumar via lldb-commits < > lldb-commits@lists.llvm.org> wrote: > > vsk created this revision. > > vsk added a reviewer: jasonmolenda. > > vsk added a subscriber: lldb-commits. > > Herald added a subscriber: mgorny. > > > > Should fix: https://llvm.org/bugs/show_bug.cgi?id=30928 > > > > > > https://reviews.llvm.org/D26338 > > > > Files: > > unittests/UnwindAssembly/CMakeLists.txt > > unittests/UnwindAssembly/InstEmulation/CMakeLists.txt > > > > > > Index: unittests/UnwindAssembly/InstEmulation/CMakeLists.txt > > === > > --- unittests/UnwindAssembly/InstEmulation/CMakeLists.txt > > +++ unittests/UnwindAssembly/InstEmulation/CMakeLists.txt > > @@ -1 +1,3 @@ > > -add_lldb_unittest(InstEmulationTests TestArm64InstEmulation.cpp) > > +if ("AArch64" IN_LIST LLVM_TARGETS_TO_BUILD) > > + add_lldb_unittest(InstEmulationTests TestArm64InstEmulation.cpp) > > +endif() > > Index: unittests/UnwindAssembly/CMakeLists.txt > > === > > --- unittests/UnwindAssembly/CMakeLists.txt > > +++ unittests/UnwindAssembly/CMakeLists.txt > > @@ -1,2 +1,5 @@ > > -add_subdirectory(x86) > > +if ("X86" IN_LIST LLVM_TARGETS_TO_BUILD) > > + add_subdirectory(x86) > > +endif() > > + > > add_subdirectory(InstEmulation) > > > > > > ___ > > lldb-commits mailing list > > lldb-commits@lists.llvm.org > > http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits > > ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [PATCH] D26338: [lldb] Don't build unit tests for unsupported targets
jasonmolenda accepted this revision. jasonmolenda added a comment. This revision is now accepted and ready to land. Thanks Vedant, we always build armv7/arm64/x86 llvm targets with the xcode style lldb/llvm builds so I hadn't seen this problem. Please commit. https://reviews.llvm.org/D26338 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] LLVM buildmaster will be restarted at 5 PM Pacific time today
Hello everyone, LLVM buildmaster will be restarted at 5 PM Pacific time today for maintenance. Thanks Galina ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r286170 - UserExpression::Evaluate only returns a non-empty ValueObjectSP
Author: jingham Date: Mon Nov 7 16:47:01 2016 New Revision: 286170 URL: http://llvm.org/viewvc/llvm-project?rev=286170&view=rev Log: UserExpression::Evaluate only returns a non-empty ValueObjectSP if it returns eExpressionCompleted. Don't try to get the error from the ValueObjectSP if that's not true. I just have a report of this from the field, I don't know how to make it fail yet. Modified: lldb/trunk/source/Expression/UserExpression.cpp lldb/trunk/source/Plugins/Platform/POSIX/PlatformPOSIX.cpp Modified: lldb/trunk/source/Expression/UserExpression.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Expression/UserExpression.cpp?rev=286170&r1=286169&r2=286170&view=diff == --- lldb/trunk/source/Expression/UserExpression.cpp (original) +++ lldb/trunk/source/Expression/UserExpression.cpp Mon Nov 7 16:47:01 2016 @@ -158,6 +158,7 @@ lldb::ExpressionResults UserExpression:: if (log) log->Printf("== [UserExpression::Evaluate] Passed a NULL target, can't " "run expressions."); +error.SetErrorString("expression passed a null target"); return lldb::eExpressionSetupError; } Modified: lldb/trunk/source/Plugins/Platform/POSIX/PlatformPOSIX.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/POSIX/PlatformPOSIX.cpp?rev=286170&r1=286169&r2=286170&view=diff == --- lldb/trunk/source/Plugins/Platform/POSIX/PlatformPOSIX.cpp (original) +++ lldb/trunk/source/Plugins/Platform/POSIX/PlatformPOSIX.cpp Mon Nov 7 16:47:01 2016 @@ -737,8 +737,12 @@ Error PlatformPOSIX::EvaluateLibdlExpres expr_options.SetTimeoutUsec(200); // 2 seconds Error expr_error; - UserExpression::Evaluate(exe_ctx, expr_options, expr_cstr, expr_prefix, - result_valobj_sp, expr_error); + ExpressionResults result = + UserExpression::Evaluate(exe_ctx, expr_options, expr_cstr, expr_prefix, + result_valobj_sp, expr_error); + if (result != eExpressionCompleted) +return expr_error; + if (result_valobj_sp->GetError().Fail()) return result_valobj_sp->GetError(); return Error(); ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r286176 - Simplify the PrintableRepresentationSpecialCases code; we never used the ePrintableRepresentationSpecialCasesOnly value and with enum classes the names doesn't need to
Author: enrico Date: Mon Nov 7 17:32:20 2016 New Revision: 286176 URL: http://llvm.org/viewvc/llvm-project?rev=286176&view=rev Log: Simplify the PrintableRepresentationSpecialCases code; we never used the ePrintableRepresentationSpecialCasesOnly value and with enum classes the names doesn't need to be that long Modified: lldb/trunk/include/lldb/Core/ValueObject.h lldb/trunk/source/Core/FormatEntity.cpp lldb/trunk/source/Core/ValueObject.cpp lldb/trunk/source/DataFormatters/ValueObjectPrinter.cpp lldb/trunk/source/Plugins/Language/CPlusPlus/LibCxx.cpp lldb/trunk/source/Plugins/Language/CPlusPlus/LibStdcpp.cpp lldb/trunk/source/Plugins/Language/CPlusPlus/LibStdcppUniquePointer.cpp Modified: lldb/trunk/include/lldb/Core/ValueObject.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/ValueObject.h?rev=286176&r1=286175&r2=286176&view=diff == --- lldb/trunk/include/lldb/Core/ValueObject.h (original) +++ lldb/trunk/include/lldb/Core/ValueObject.h Mon Nov 7 17:32:20 2016 @@ -536,10 +536,9 @@ public: ValueObjectRepresentationStyle val_obj_display, lldb::Format custom_format); - enum PrintableRepresentationSpecialCases { -ePrintableRepresentationSpecialCasesDisable = 0, -ePrintableRepresentationSpecialCasesAllow = 1, -ePrintableRepresentationSpecialCasesOnly = 3 + enum class PrintableRepresentationSpecialCases : bool { +eDisable = false, +eAllow = true }; bool @@ -548,7 +547,7 @@ public: eValueObjectRepresentationStyleSummary, lldb::Format custom_format = lldb::eFormatInvalid, PrintableRepresentationSpecialCases special = - ePrintableRepresentationSpecialCasesAllow, + PrintableRepresentationSpecialCases::eAllow, bool do_dump_error = true); bool GetValueIsValid() const; Modified: lldb/trunk/source/Core/FormatEntity.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/FormatEntity.cpp?rev=286176&r1=286175&r2=286176&view=diff == --- lldb/trunk/source/Core/FormatEntity.cpp (original) +++ lldb/trunk/source/Core/FormatEntity.cpp Mon Nov 7 17:32:20 2016 @@ -874,7 +874,7 @@ static bool DumpValue(Stream &s, const S { target->DumpPrintableRepresentation( s, val_obj_display, custom_format, -ValueObject::ePrintableRepresentationSpecialCasesDisable); +ValueObject::PrintableRepresentationSpecialCases::eDisable); } return true; } @@ -1676,8 +1676,7 @@ bool FormatEntity::Format(const Entry &e ss, ValueObject::ValueObjectRepresentationStyle:: eValueObjectRepresentationStyleSummary, eFormatDefault, - ValueObject::PrintableRepresentationSpecialCases:: - ePrintableRepresentationSpecialCasesAllow, + ValueObject::PrintableRepresentationSpecialCases::eAllow, false); } Modified: lldb/trunk/source/Core/ValueObject.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/ValueObject.cpp?rev=286176&r1=286175&r2=286176&view=diff == --- lldb/trunk/source/Core/ValueObject.cpp (original) +++ lldb/trunk/source/Core/ValueObject.cpp Mon Nov 7 17:32:20 2016 @@ -1279,10 +1279,9 @@ bool ValueObject::DumpPrintableRepresent Flags flags(GetTypeInfo()); - bool allow_special = ((special & ePrintableRepresentationSpecialCasesAllow) == -ePrintableRepresentationSpecialCasesAllow); - bool only_special = ((special & ePrintableRepresentationSpecialCasesOnly) == - ePrintableRepresentationSpecialCasesOnly); + bool allow_special = + (special == ValueObject::PrintableRepresentationSpecialCases::eAllow); + const bool only_special = false; if (allow_special) { if (flags.AnySet(eTypeIsArray | eTypeIsPointer) && Modified: lldb/trunk/source/DataFormatters/ValueObjectPrinter.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/DataFormatters/ValueObjectPrinter.cpp?rev=286176&r1=286175&r2=286176&view=diff == --- lldb/trunk/source/DataFormatters/ValueObjectPrinter.cpp (original) +++ lldb/trunk/source/DataFormatters/ValueObjectPrinter.cpp Mon Nov 7 17:32:20 2016 @@ -762,7 +762,7 @@ bool ValueObjectPrinter::PrintChildrenOn child_sp->DumpPrintableRepresentation( *m_stream, ValueObject::eValueObjectRepresentationStyleSummary, m_options.m_format, -ValueObject::ePrintable
[Lldb-commits] [PATCH] D22231: Implement trampoline step-through for Windows-x86.
jingham accepted this revision. jingham added a comment. This revision is now accepted and ready to land. I seem not to close the formal loop on these reviews... https://reviews.llvm.org/D22231 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [PATCH] D26325: Re-write OutputFormattedHelpText in terms of StringRef
jingham accepted this revision. jingham added a comment. This revision is now accepted and ready to land. This looks formally equivalent to me. https://reviews.llvm.org/D26325 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [PATCH] D26124: [LLDB-MI] Escape MI output in a more consistent manner
enlight added a comment. @ki.stfu Are you OK with this going in? Repository: rL LLVM https://reviews.llvm.org/D26124 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r286204 - Rewrite OutputFormattedHelpText in terms of StringRef.
Author: zturner Date: Mon Nov 7 22:12:42 2016 New Revision: 286204 URL: http://llvm.org/viewvc/llvm-project?rev=286204&view=rev Log: Rewrite OutputFormattedHelpText in terms of StringRef. This makes the logic easier to follow and also propagates StringRef up to the API boundary, which is necessary for making higher up StringRef API changes. Differential Revision: https://reviews.llvm.org/D26325 Modified: lldb/trunk/include/lldb/Core/Stream.h lldb/trunk/include/lldb/Interpreter/CommandInterpreter.h lldb/trunk/source/Core/Stream.cpp lldb/trunk/source/Interpreter/CommandInterpreter.cpp Modified: lldb/trunk/include/lldb/Core/Stream.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/Stream.h?rev=286204&r1=286203&r2=286204&view=diff == --- lldb/trunk/include/lldb/Core/Stream.h (original) +++ lldb/trunk/include/lldb/Core/Stream.h Mon Nov 7 22:12:42 2016 @@ -191,6 +191,8 @@ public: //-- Stream &operator<<(const char *cstr); + Stream &operator<<(llvm::StringRef str); + //-- /// Output a pointer value \a p to the stream \a s. /// Modified: lldb/trunk/include/lldb/Interpreter/CommandInterpreter.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Interpreter/CommandInterpreter.h?rev=286204&r1=286203&r2=286204&view=diff == --- lldb/trunk/include/lldb/Interpreter/CommandInterpreter.h (original) +++ lldb/trunk/include/lldb/Interpreter/CommandInterpreter.h Mon Nov 7 22:12:42 2016 @@ -336,24 +336,21 @@ public: void GetAliasHelp(const char *alias_name, StreamString &help_string); - void OutputFormattedHelpText(Stream &strm, const char *prefix, - const char *help_text); + void OutputFormattedHelpText(Stream &strm, llvm::StringRef prefix, + llvm::StringRef help_text); - void OutputFormattedHelpText(Stream &stream, const char *command_word, - const char *separator, const char *help_text, - size_t max_word_len); + void OutputFormattedHelpText(Stream &stream, llvm::StringRef command_word, + llvm::StringRef separator, + llvm::StringRef help_text, size_t max_word_len); // this mimics OutputFormattedHelpText but it does perform a much simpler // formatting, basically ensuring line alignment. This is only good if you - // have - // some complicated layout for your help text and want as little help as - // reasonable - // in properly displaying it. Most of the times, you simply want to type some - // text - // and have it printed in a reasonable way on screen. If so, use - // OutputFormattedHelpText - void OutputHelpText(Stream &stream, const char *command_word, - const char *separator, const char *help_text, + // have some complicated layout for your help text and want as little help as + // reasonable in properly displaying it. Most of the times, you simply want + // to type some text and have it printed in a reasonable way on screen. If + // so, use OutputFormattedHelpText + void OutputHelpText(Stream &stream, llvm::StringRef command_word, + llvm::StringRef separator, llvm::StringRef help_text, uint32_t max_word_len); Debugger &GetDebugger() { return m_debugger; } Modified: lldb/trunk/source/Core/Stream.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/Stream.cpp?rev=286204&r1=286203&r2=286204&view=diff == --- lldb/trunk/source/Core/Stream.cpp (original) +++ lldb/trunk/source/Core/Stream.cpp Mon Nov 7 22:12:42 2016 @@ -227,6 +227,11 @@ Stream &Stream::operator<<(const char *s return *this; } +Stream &Stream::operator<<(llvm::StringRef str) { + Write(str.data(), str.size()); + return *this; +} + //-- // Stream the pointer value out to this stream. //-- Modified: lldb/trunk/source/Interpreter/CommandInterpreter.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Interpreter/CommandInterpreter.cpp?rev=286204&r1=286203&r2=286204&view=diff == --- lldb/trunk/source/Interpreter/CommandInterpreter.cpp (original) +++ lldb/trunk/source/Interpreter/CommandInterpreter.cpp Mon Nov 7 22:12:42 2016 @@ -1104,9 +1104,10 @@ bool CommandInterpreter::RemoveUser(llvm void CommandInterpreter::GetHelp(CommandReturnObject &result, uint32_t cmd_types) { - const ch
[Lldb-commits] [PATCH] D26325: Re-write OutputFormattedHelpText in terms of StringRef
This revision was automatically updated to reflect the committed changes. Closed by commit rL286204: Rewrite OutputFormattedHelpText in terms of StringRef. (authored by zturner). Changed prior to commit: https://reviews.llvm.org/D26325?vs=76970&id=77138#toc Repository: rL LLVM https://reviews.llvm.org/D26325 Files: lldb/trunk/include/lldb/Core/Stream.h lldb/trunk/include/lldb/Interpreter/CommandInterpreter.h lldb/trunk/source/Core/Stream.cpp lldb/trunk/source/Interpreter/CommandInterpreter.cpp Index: lldb/trunk/include/lldb/Core/Stream.h === --- lldb/trunk/include/lldb/Core/Stream.h +++ lldb/trunk/include/lldb/Core/Stream.h @@ -191,6 +191,8 @@ //-- Stream &operator<<(const char *cstr); + Stream &operator<<(llvm::StringRef str); + //-- /// Output a pointer value \a p to the stream \a s. /// Index: lldb/trunk/include/lldb/Interpreter/CommandInterpreter.h === --- lldb/trunk/include/lldb/Interpreter/CommandInterpreter.h +++ lldb/trunk/include/lldb/Interpreter/CommandInterpreter.h @@ -336,24 +336,21 @@ void GetAliasHelp(const char *alias_name, StreamString &help_string); - void OutputFormattedHelpText(Stream &strm, const char *prefix, - const char *help_text); + void OutputFormattedHelpText(Stream &strm, llvm::StringRef prefix, + llvm::StringRef help_text); - void OutputFormattedHelpText(Stream &stream, const char *command_word, - const char *separator, const char *help_text, - size_t max_word_len); + void OutputFormattedHelpText(Stream &stream, llvm::StringRef command_word, + llvm::StringRef separator, + llvm::StringRef help_text, size_t max_word_len); // this mimics OutputFormattedHelpText but it does perform a much simpler // formatting, basically ensuring line alignment. This is only good if you - // have - // some complicated layout for your help text and want as little help as - // reasonable - // in properly displaying it. Most of the times, you simply want to type some - // text - // and have it printed in a reasonable way on screen. If so, use - // OutputFormattedHelpText - void OutputHelpText(Stream &stream, const char *command_word, - const char *separator, const char *help_text, + // have some complicated layout for your help text and want as little help as + // reasonable in properly displaying it. Most of the times, you simply want + // to type some text and have it printed in a reasonable way on screen. If + // so, use OutputFormattedHelpText + void OutputHelpText(Stream &stream, llvm::StringRef command_word, + llvm::StringRef separator, llvm::StringRef help_text, uint32_t max_word_len); Debugger &GetDebugger() { return m_debugger; } Index: lldb/trunk/source/Core/Stream.cpp === --- lldb/trunk/source/Core/Stream.cpp +++ lldb/trunk/source/Core/Stream.cpp @@ -227,6 +227,11 @@ return *this; } +Stream &Stream::operator<<(llvm::StringRef str) { + Write(str.data(), str.size()); + return *this; +} + //-- // Stream the pointer value out to this stream. //-- Index: lldb/trunk/source/Interpreter/CommandInterpreter.cpp === --- lldb/trunk/source/Interpreter/CommandInterpreter.cpp +++ lldb/trunk/source/Interpreter/CommandInterpreter.cpp @@ -1104,9 +1104,10 @@ void CommandInterpreter::GetHelp(CommandReturnObject &result, uint32_t cmd_types) { - const char *help_prologue = GetDebugger().GetIOHandlerHelpPrologue(); - if (help_prologue != NULL) { -OutputFormattedHelpText(result.GetOutputStream(), NULL, help_prologue); + llvm::StringRef help_prologue(GetDebugger().GetIOHandlerHelpPrologue()); + if (!help_prologue.empty()) { +OutputFormattedHelpText(result.GetOutputStream(), llvm::StringRef(), +help_prologue); } CommandObject::CommandMap::const_iterator pos; @@ -1121,8 +1122,8 @@ (pos->first.compare(0, 1, "_") == 0)) continue; - OutputFormattedHelpText(result.GetOutputStream(), pos->first.c_str(), - "--", pos->second->GetHelp(), max_len); + OutputFormattedHelpText(result.GetOutputStream(), pos->first, "--", + pos->second->GetHelp(), max_len); } result.AppendMessage(""); } @@ -1138,8 +1139,7 @@ for
[Lldb-commits] [lldb] r286208 - Convert some Expression parser functions to StringRef.
Author: zturner Date: Mon Nov 7 22:52:16 2016 New Revision: 286208 URL: http://llvm.org/viewvc/llvm-project?rev=286208&view=rev Log: Convert some Expression parser functions to StringRef. Modified: lldb/trunk/include/lldb/Core/RegularExpression.h lldb/trunk/include/lldb/Expression/ExpressionVariable.h lldb/trunk/include/lldb/Expression/LLVMUserExpression.h lldb/trunk/include/lldb/Expression/UserExpression.h lldb/trunk/include/lldb/Interpreter/Args.h lldb/trunk/include/lldb/Symbol/ClangASTContext.h lldb/trunk/include/lldb/Symbol/GoASTContext.h lldb/trunk/include/lldb/Symbol/TypeSystem.h lldb/trunk/include/lldb/Target/Target.h lldb/trunk/source/Breakpoint/BreakpointLocation.cpp lldb/trunk/source/Breakpoint/Watchpoint.cpp lldb/trunk/source/Core/RegularExpression.cpp lldb/trunk/source/Expression/LLVMUserExpression.cpp lldb/trunk/source/Expression/UserExpression.cpp lldb/trunk/source/Interpreter/Args.cpp lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangUserExpression.cpp lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangUserExpression.h lldb/trunk/source/Plugins/ExpressionParser/Go/GoUserExpression.cpp lldb/trunk/source/Plugins/ExpressionParser/Go/GoUserExpression.h lldb/trunk/source/Symbol/ClangASTContext.cpp lldb/trunk/source/Symbol/GoASTContext.cpp lldb/trunk/source/Target/StopInfo.cpp lldb/trunk/source/Target/Target.cpp Modified: lldb/trunk/include/lldb/Core/RegularExpression.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/RegularExpression.h?rev=286208&r1=286207&r2=286208&view=diff == --- lldb/trunk/include/lldb/Core/RegularExpression.h (original) +++ lldb/trunk/include/lldb/Core/RegularExpression.h Mon Nov 7 22:52:16 2016 @@ -77,13 +77,14 @@ public: return (m_matches.empty() ? nullptr : m_matches.data()); } -bool GetMatchAtIndex(const char *s, uint32_t idx, +bool GetMatchAtIndex(llvm::StringRef s, uint32_t idx, std::string &match_str) const; -bool GetMatchAtIndex(const char *s, uint32_t idx, +bool GetMatchAtIndex(llvm::StringRef s, uint32_t idx, llvm::StringRef &match_str) const; -bool GetMatchSpanningIndices(const char *s, uint32_t idx1, uint32_t idx2, +bool GetMatchSpanningIndices(llvm::StringRef s, uint32_t idx1, + uint32_t idx2, llvm::StringRef &match_str) const; protected: @@ -100,7 +101,6 @@ public: RegularExpression(); explicit RegularExpression(llvm::StringRef string); - explicit RegularExpression(const char *) = delete; //-- /// Destructor. Modified: lldb/trunk/include/lldb/Expression/ExpressionVariable.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Expression/ExpressionVariable.h?rev=286208&r1=286207&r2=286208&view=diff == --- lldb/trunk/include/lldb/Expression/ExpressionVariable.h (original) +++ lldb/trunk/include/lldb/Expression/ExpressionVariable.h Mon Nov 7 22:52:16 2016 @@ -189,20 +189,17 @@ public: return var_sp; } - lldb::ExpressionVariableSP GetVariable(const char *name) { -lldb::ExpressionVariableSP var_sp; -if (name && name[0]) { - for (size_t index = 0, size = GetSize(); index < size; ++index) { -var_sp = GetVariableAtIndex(index); -const char *var_name_cstr = var_sp->GetName().GetCString(); -if (!var_name_cstr || !name) - continue; -if (::strcmp(var_name_cstr, name) == 0) - return var_sp; - } - var_sp.reset(); + lldb::ExpressionVariableSP GetVariable(llvm::StringRef name) { +if (name.empty()) + return nullptr; + +for (size_t index = 0, size = GetSize(); index < size; ++index) { + auto var_sp = GetVariableAtIndex(index); + llvm::StringRef var_name_str = var_sp->GetName().GetStringRef(); + if (var_name_str == name) +return var_sp; } -return var_sp; +return nullptr; } void RemoveVariable(lldb::ExpressionVariableSP var_sp) { Modified: lldb/trunk/include/lldb/Expression/LLVMUserExpression.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Expression/LLVMUserExpression.h?rev=286208&r1=286207&r2=286208&view=diff == --- lldb/trunk/include/lldb/Expression/LLVMUserExpression.h (original) +++ lldb/trunk/include/lldb/Expression/LLVMUserExpression.h Mon Nov 7 22:52:16 2016 @@ -51,8 +51,8 @@ public: std::shared_ptr LatePasses; }; - LLVMUserExpression(ExecutionContextScope &exe_scope, const char *expr, - const char *expr_prefix, lldb::LanguageType language, + LLVMUserExpression(ExecutionCont
[Lldb-commits] [lldb] r286215 - [lldb] Don't build unit tests for unsupported targets
Author: vedantk Date: Tue Nov 8 00:49:59 2016 New Revision: 286215 URL: http://llvm.org/viewvc/llvm-project?rev=286215&view=rev Log: [lldb] Don't build unit tests for unsupported targets Differential Revision: https://reviews.llvm.org/D26338 Modified: lldb/trunk/unittests/UnwindAssembly/CMakeLists.txt lldb/trunk/unittests/UnwindAssembly/InstEmulation/CMakeLists.txt Modified: lldb/trunk/unittests/UnwindAssembly/CMakeLists.txt URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/unittests/UnwindAssembly/CMakeLists.txt?rev=286215&r1=286214&r2=286215&view=diff == --- lldb/trunk/unittests/UnwindAssembly/CMakeLists.txt (original) +++ lldb/trunk/unittests/UnwindAssembly/CMakeLists.txt Tue Nov 8 00:49:59 2016 @@ -1,2 +1,5 @@ -add_subdirectory(x86) +if ("X86" IN_LIST LLVM_TARGETS_TO_BUILD) + add_subdirectory(x86) +endif() + add_subdirectory(InstEmulation) Modified: lldb/trunk/unittests/UnwindAssembly/InstEmulation/CMakeLists.txt URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/unittests/UnwindAssembly/InstEmulation/CMakeLists.txt?rev=286215&r1=286214&r2=286215&view=diff == --- lldb/trunk/unittests/UnwindAssembly/InstEmulation/CMakeLists.txt (original) +++ lldb/trunk/unittests/UnwindAssembly/InstEmulation/CMakeLists.txt Tue Nov 8 00:49:59 2016 @@ -1 +1,3 @@ -add_lldb_unittest(InstEmulationTests TestArm64InstEmulation.cpp) +if ("AArch64" IN_LIST LLVM_TARGETS_TO_BUILD) + add_lldb_unittest(InstEmulationTests TestArm64InstEmulation.cpp) +endif() ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [PATCH] D26338: [lldb] Don't build unit tests for unsupported targets
This revision was automatically updated to reflect the committed changes. Closed by commit rL286215: [lldb] Don't build unit tests for unsupported targets (authored by vedantk). Changed prior to commit: https://reviews.llvm.org/D26338?vs=77001&id=77148#toc Repository: rL LLVM https://reviews.llvm.org/D26338 Files: lldb/trunk/unittests/UnwindAssembly/CMakeLists.txt lldb/trunk/unittests/UnwindAssembly/InstEmulation/CMakeLists.txt Index: lldb/trunk/unittests/UnwindAssembly/InstEmulation/CMakeLists.txt === --- lldb/trunk/unittests/UnwindAssembly/InstEmulation/CMakeLists.txt +++ lldb/trunk/unittests/UnwindAssembly/InstEmulation/CMakeLists.txt @@ -1 +1,3 @@ -add_lldb_unittest(InstEmulationTests TestArm64InstEmulation.cpp) +if ("AArch64" IN_LIST LLVM_TARGETS_TO_BUILD) + add_lldb_unittest(InstEmulationTests TestArm64InstEmulation.cpp) +endif() Index: lldb/trunk/unittests/UnwindAssembly/CMakeLists.txt === --- lldb/trunk/unittests/UnwindAssembly/CMakeLists.txt +++ lldb/trunk/unittests/UnwindAssembly/CMakeLists.txt @@ -1,2 +1,5 @@ -add_subdirectory(x86) +if ("X86" IN_LIST LLVM_TARGETS_TO_BUILD) + add_subdirectory(x86) +endif() + add_subdirectory(InstEmulation) Index: lldb/trunk/unittests/UnwindAssembly/InstEmulation/CMakeLists.txt === --- lldb/trunk/unittests/UnwindAssembly/InstEmulation/CMakeLists.txt +++ lldb/trunk/unittests/UnwindAssembly/InstEmulation/CMakeLists.txt @@ -1 +1,3 @@ -add_lldb_unittest(InstEmulationTests TestArm64InstEmulation.cpp) +if ("AArch64" IN_LIST LLVM_TARGETS_TO_BUILD) + add_lldb_unittest(InstEmulationTests TestArm64InstEmulation.cpp) +endif() Index: lldb/trunk/unittests/UnwindAssembly/CMakeLists.txt === --- lldb/trunk/unittests/UnwindAssembly/CMakeLists.txt +++ lldb/trunk/unittests/UnwindAssembly/CMakeLists.txt @@ -1,2 +1,5 @@ -add_subdirectory(x86) +if ("X86" IN_LIST LLVM_TARGETS_TO_BUILD) + add_subdirectory(x86) +endif() + add_subdirectory(InstEmulation) ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits