[Lldb-commits] [lldb] ff85dcb - [lldb] Remove PlatformDarwin::GetCompatibleArch helper
Author: Jonas Devlieghere Date: 2022-01-15T09:51:16-08:00 New Revision: ff85dcb1c5b01411a6f9f2dc4c0e087467411f50 URL: https://github.com/llvm/llvm-project/commit/ff85dcb1c5b01411a6f9f2dc4c0e087467411f50 DIFF: https://github.com/llvm/llvm-project/commit/ff85dcb1c5b01411a6f9f2dc4c0e087467411f50.diff LOG: [lldb] Remove PlatformDarwin::GetCompatibleArch helper This also removes the corresponding unit tests. I wrote them to sanity check my original refactoring and checked them in because why not. The current implementation, without the added complexity of indices, is simple enough that we can do without it. Added: Modified: lldb/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp lldb/unittests/Platform/PlatformDarwinTest.cpp Removed: diff --git a/lldb/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp b/lldb/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp index 29d2d8213601..461a21f44421 100644 --- a/lldb/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp +++ b/lldb/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp @@ -631,15 +631,6 @@ static llvm::ArrayRef GetCompatibleArchs(ArchSpec::Core core) { return {}; } -const char *PlatformDarwin::GetCompatibleArch(ArchSpec::Core core, size_t idx) { - llvm::ArrayRef compatible_archs = GetCompatibleArchs(core); - if (!compatible_archs.data()) -return nullptr; - if (idx < compatible_archs.size()) -return compatible_archs[idx]; - return nullptr; -} - /// The architecture selection rules for arm processors These cpu subtypes have /// distinct names (e.g. armv7f) but armv7 binaries run fine on an armv7f /// processor. @@ -647,12 +638,9 @@ void PlatformDarwin::ARMGetSupportedArchitectures( std::vector &archs, llvm::Optional os) { const ArchSpec system_arch = GetSystemArchitecture(); const ArchSpec::Core system_core = system_arch.GetCore(); - - const char *compatible_arch; - for (unsigned idx = 0; - (compatible_arch = GetCompatibleArch(system_core, idx)); ++idx) { + for (const char *arch : GetCompatibleArchs(system_core)) { llvm::Triple triple; -triple.setArchName(compatible_arch); +triple.setArchName(arch); triple.setVendor(llvm::Triple::VendorType::Apple); if (os) triple.setOS(*os); diff --git a/lldb/unittests/Platform/PlatformDarwinTest.cpp b/lldb/unittests/Platform/PlatformDarwinTest.cpp index 73a0b37fbc77..285dc2ee3db7 100644 --- a/lldb/unittests/Platform/PlatformDarwinTest.cpp +++ b/lldb/unittests/Platform/PlatformDarwinTest.cpp @@ -20,7 +20,6 @@ using namespace lldb_private; struct PlatformDarwinTester : public PlatformDarwin { public: using PlatformDarwin::FindComponentInPath; - using PlatformDarwin::GetCompatibleArch; }; TEST(PlatformDarwinTest, TestParseVersionBuildDir) { @@ -67,95 +66,3 @@ TEST(PlatformDarwinTest, FindComponentInPath) { EXPECT_EQ("", PlatformDarwinTester::FindComponentInPath("/path/to/foo", "bar")); } - -TEST(PlatformDarwinTest, GetCompatibleArchARM64) { - const ArchSpec::Core core = ArchSpec::eCore_arm_arm64; - EXPECT_STREQ("arm64", PlatformDarwinTester::GetCompatibleArch(core, 0)); - EXPECT_STREQ("armv7", PlatformDarwinTester::GetCompatibleArch(core, 1)); - EXPECT_STREQ("armv4", PlatformDarwinTester::GetCompatibleArch(core, 10)); - EXPECT_STREQ("arm", PlatformDarwinTester::GetCompatibleArch(core, 11)); - EXPECT_STREQ("thumbv7", PlatformDarwinTester::GetCompatibleArch(core, 12)); - EXPECT_STREQ("thumbv4t", PlatformDarwinTester::GetCompatibleArch(core, 21)); - EXPECT_STREQ("thumb", PlatformDarwinTester::GetCompatibleArch(core, 22)); - EXPECT_EQ(nullptr, PlatformDarwinTester::GetCompatibleArch(core, 23)); -} - -TEST(PlatformDarwinTest, GetCompatibleArchARMv7f) { - const ArchSpec::Core core = ArchSpec::eCore_arm_armv7f; - EXPECT_STREQ("armv7f", PlatformDarwinTester::GetCompatibleArch(core, 0)); - EXPECT_STREQ("armv7", PlatformDarwinTester::GetCompatibleArch(core, 1)); - EXPECT_STREQ("arm", PlatformDarwinTester::GetCompatibleArch(core, 6)); - EXPECT_STREQ("thumbv7f", PlatformDarwinTester::GetCompatibleArch(core, 7)); -} - -TEST(PlatformDarwinTest, GetCompatibleArchARMv7k) { - const ArchSpec::Core core = ArchSpec::eCore_arm_armv7k; - EXPECT_STREQ("armv7k", PlatformDarwinTester::GetCompatibleArch(core, 0)); - EXPECT_STREQ("armv7", PlatformDarwinTester::GetCompatibleArch(core, 1)); - EXPECT_STREQ("arm", PlatformDarwinTester::GetCompatibleArch(core, 6)); - EXPECT_STREQ("thumbv7k", PlatformDarwinTester::GetCompatibleArch(core, 7)); -} - -TEST(PlatformDarwinTest, GetCompatibleArchARMv7s) { - const ArchSpec::Core core = ArchSpec::eCore_arm_armv7s; - EXPECT_STREQ("armv7s", PlatformDarwinTester::GetCompatibleArch(core, 0)); - EXPECT_STREQ("armv7", PlatformDarwinTester::GetCompatibleArch(core, 1)); - EXPECT_STREQ("arm", PlatformDarwinTester::GetCompatibleArch(core, 6)); - EXPECT_STREQ("thumbv7s", PlatformDarwinTester::GetCom
[Lldb-commits] [lldb] a7e7f54 - [lldb] Remove anon struct from frame-var-anon-unions test
Author: Dave Lee Date: 2022-01-15T10:20:52-08:00 New Revision: a7e7f541c0813e9d3f6c641ad8ff89619ec749d8 URL: https://github.com/llvm/llvm-project/commit/a7e7f541c0813e9d3f6c641ad8ff89619ec749d8 DIFF: https://github.com/llvm/llvm-project/commit/a7e7f541c0813e9d3f6c641ad8ff89619ec749d8.diff LOG: [lldb] Remove anon struct from frame-var-anon-unions test This test for anonymous unions seems off. It tests the following: ``` union { // fields }; struct { // fields } var{...}; ``` Both are anonymous types, but the first does not declare a variable and the second one does. The test then checks that `frame var` can directly access the fields of the anonymous union, but can't directly access the fields of the anonymous struct variable. The second test, to directly access the members of the struct variable, seems pointless as similar code would not compile. A demonstration: ``` struct { int a; int z; } a_z{23, 45}; printf("%d\n", a_z.a); // fine printf("%d\n", a); // this does not compile ``` Since we can't directly access the fields in code, I'm not sure there's a reason to test that lldb also can't directly access them (other than perhaps as a regression test). Differential Revision: https://reviews.llvm.org/D116863 Added: Modified: lldb/test/API/lang/cpp/frame-var-anon-unions/TestFrameVariableAnonymousUnions.py lldb/test/API/lang/cpp/frame-var-anon-unions/main.cpp Removed: diff --git a/lldb/test/API/lang/cpp/frame-var-anon-unions/TestFrameVariableAnonymousUnions.py b/lldb/test/API/lang/cpp/frame-var-anon-unions/TestFrameVariableAnonymousUnions.py index 6352b68e7d753..6462896042f35 100644 --- a/lldb/test/API/lang/cpp/frame-var-anon-unions/TestFrameVariableAnonymousUnions.py +++ b/lldb/test/API/lang/cpp/frame-var-anon-unions/TestFrameVariableAnonymousUnions.py @@ -29,7 +29,3 @@ def test_with_run_command(self): self.expect('frame variable -f x i', substrs=['4100']) self.expect('frame variable c', substrs=["'A"]) - -self.expect('frame variable x', matching=False, substrs=['3']) -self.expect('frame variable y', matching=False, substrs=["'B'"]) -self.expect('frame variable z', matching=False, substrs=['14']) diff --git a/lldb/test/API/lang/cpp/frame-var-anon-unions/main.cpp b/lldb/test/API/lang/cpp/frame-var-anon-unions/main.cpp index 7c0eac23600a1..976d3f554b0d1 100644 --- a/lldb/test/API/lang/cpp/frame-var-anon-unions/main.cpp +++ b/lldb/test/API/lang/cpp/frame-var-anon-unions/main.cpp @@ -3,11 +3,6 @@ int main() { int i; char c; }; - struct { -int x; -char y; -short z; - } s{3,'B',14}; i = 0xFF00; c = 'A'; return c; // break here ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [PATCH] D116863: [lldb] Remove anon struct from frame-var-anon-unions test
This revision was not accepted when it landed; it landed in state "Needs Review". This revision was automatically updated to reflect the committed changes. Closed by commit rGa7e7f541c081: [lldb] Remove anon struct from frame-var-anon-unions test (authored by kastiglione). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116863/new/ https://reviews.llvm.org/D116863 Files: lldb/test/API/lang/cpp/frame-var-anon-unions/TestFrameVariableAnonymousUnions.py lldb/test/API/lang/cpp/frame-var-anon-unions/main.cpp Index: lldb/test/API/lang/cpp/frame-var-anon-unions/main.cpp === --- lldb/test/API/lang/cpp/frame-var-anon-unions/main.cpp +++ lldb/test/API/lang/cpp/frame-var-anon-unions/main.cpp @@ -3,11 +3,6 @@ int i; char c; }; - struct { -int x; -char y; -short z; - } s{3,'B',14}; i = 0xFF00; c = 'A'; return c; // break here Index: lldb/test/API/lang/cpp/frame-var-anon-unions/TestFrameVariableAnonymousUnions.py === --- lldb/test/API/lang/cpp/frame-var-anon-unions/TestFrameVariableAnonymousUnions.py +++ lldb/test/API/lang/cpp/frame-var-anon-unions/TestFrameVariableAnonymousUnions.py @@ -29,7 +29,3 @@ self.expect('frame variable -f x i', substrs=['4100']) self.expect('frame variable c', substrs=["'A"]) - -self.expect('frame variable x', matching=False, substrs=['3']) -self.expect('frame variable y', matching=False, substrs=["'B'"]) -self.expect('frame variable z', matching=False, substrs=['14']) Index: lldb/test/API/lang/cpp/frame-var-anon-unions/main.cpp === --- lldb/test/API/lang/cpp/frame-var-anon-unions/main.cpp +++ lldb/test/API/lang/cpp/frame-var-anon-unions/main.cpp @@ -3,11 +3,6 @@ int i; char c; }; - struct { -int x; -char y; -short z; - } s{3,'B',14}; i = 0xFF00; c = 'A'; return c; // break here Index: lldb/test/API/lang/cpp/frame-var-anon-unions/TestFrameVariableAnonymousUnions.py === --- lldb/test/API/lang/cpp/frame-var-anon-unions/TestFrameVariableAnonymousUnions.py +++ lldb/test/API/lang/cpp/frame-var-anon-unions/TestFrameVariableAnonymousUnions.py @@ -29,7 +29,3 @@ self.expect('frame variable -f x i', substrs=['4100']) self.expect('frame variable c', substrs=["'A"]) - -self.expect('frame variable x', matching=False, substrs=['3']) -self.expect('frame variable y', matching=False, substrs=["'B'"]) -self.expect('frame variable z', matching=False, substrs=['14']) ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D116972: [lldb] Run the test suite in verbose mode
Hey Galina, Seems like this didn't take effect until the buildbots got rebooted, which seems to have happened last night. Apparently my patch broke all the buildbots because the jobs variable was not what I thought it was... Anyway, I've removed the offending code in 4d68a096efc7b5ad0d55cf64225962b9ba9ffed9. Would you mind restarting the buildbots again so that can take effect? Thanks, Jonas On Thu, Jan 13, 2022 at 3:30 PM Jonas Devlieghere via Phabricator via lldb-commits wrote: > This revision was landed with ongoing or failed builds. > This revision was automatically updated to reflect the committed changes. > Closed by commit rZORG38ab06456f73: [lldb] Run the test suite in verbose > mode (authored by JDevlieghere). > Herald added a reviewer: gkistanova. > > Repository: > rZORG LLVM Github Zorg > > CHANGES SINCE LAST ACTION > https://reviews.llvm.org/D116972/new/ > > https://reviews.llvm.org/D116972 > > Files: > zorg/buildbot/builders/LLDBBuilder.py > > > Index: zorg/buildbot/builders/LLDBBuilder.py > === > --- zorg/buildbot/builders/LLDBBuilder.py > +++ zorg/buildbot/builders/LLDBBuilder.py > @@ -48,11 +48,13 @@ > build_cmd=['ninja'] > install_cmd = ['ninja','install'] > test_cmd = ['ninja','check-lldb'] > +lit_args = '-v' > > if jobs: > build_cmd.append(WithProperties("-j%s" % jobs)) > install_cmd.append(WithProperties("-j%s" % jobs)) > test_cmd.append(WithProperties("-j%s" % jobs)) > +lit_args += " -j%s" % jobs > > # CLEANING > cleanBuildRequested = lambda step: clean or > step.build.getProperty("clean", default=step.build.getProperty("clean_obj")) > @@ -67,6 +69,7 @@ > cmake_options = [ > "-G", "Ninja", > "-DCMAKE_BUILD_TYPE=" + config, > +"-DLLVM_LIT_ARGS='%s'" % lit_args, > "-DCMAKE_INSTALL_PREFIX=../install", > "-DLLVM_ENABLE_PROJECTS=%s" % ";".join(f.depends_on_projects), > ] > > > ___ > lldb-commits mailing list > lldb-commits@lists.llvm.org > https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits > ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] a6469cd - [lldb] Correctly display the number of types found
Author: Jonas Devlieghere Date: 2022-01-15T10:31:49-08:00 New Revision: a6469cdbc426437dcb8442ae398f0a863336de37 URL: https://github.com/llvm/llvm-project/commit/a6469cdbc426437dcb8442ae398f0a863336de37 DIFF: https://github.com/llvm/llvm-project/commit/a6469cdbc426437dcb8442ae398f0a863336de37.diff LOG: [lldb] Correctly display the number of types found Correctly display the number of types found for `target modules lookup --type` and add a test. Fixes #53219 Added: Modified: lldb/source/Commands/CommandObjectTarget.cpp lldb/test/API/commands/target/basic/TestTargetCommand.py Removed: diff --git a/lldb/source/Commands/CommandObjectTarget.cpp b/lldb/source/Commands/CommandObjectTarget.cpp index 2a42eb22938d7..bd19ac513d017 100644 --- a/lldb/source/Commands/CommandObjectTarget.cpp +++ b/lldb/source/Commands/CommandObjectTarget.cpp @@ -1605,7 +1605,6 @@ static size_t LookupTypeInModule(Target *target, TypeList type_list; if (module && name_cstr && name_cstr[0]) { const uint32_t max_num_matches = UINT32_MAX; -size_t num_matches = 0; bool name_is_fully_qualified = false; ConstString name(name_cstr); @@ -1616,8 +1615,10 @@ static size_t LookupTypeInModule(Target *target, if (type_list.Empty()) return 0; +const uint64_t num_matches = type_list.GetSize(); + strm.Indent(); -strm.Printf("%" PRIu64 " match%s found in ", (uint64_t)num_matches, +strm.Printf("%" PRIu64 " match%s found in ", num_matches, num_matches > 1 ? "es" : ""); DumpFullpath(strm, &module->GetFileSpec(), 0); strm.PutCString(":\n"); diff --git a/lldb/test/API/commands/target/basic/TestTargetCommand.py b/lldb/test/API/commands/target/basic/TestTargetCommand.py index 30cb9d7d6c84f..9904eb02394a9 100644 --- a/lldb/test/API/commands/target/basic/TestTargetCommand.py +++ b/lldb/test/API/commands/target/basic/TestTargetCommand.py @@ -468,3 +468,11 @@ def test_target_modules_search_paths_query(self): # Invalid arguments. self.expect("target modules search-paths query faz baz", error=True, substrs=["query requires one argument"]) + +@no_debug_info_test +def test_target_modules_type(self): +self.buildB() +self.runCmd("file " + self.getBuildArtifact("b.out"), +CURRENT_EXECUTABLE_SET) +self.expect("target modules lookup --type int", +substrs=["1 match found", 'name = "int"']) ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] 62af3eb - [CMake][LLDB] Resolve install conflict when `LLDB_BUILD_FRAMEWORK=ON`
Author: paperchalice Date: 2022-01-15T10:43:05-08:00 New Revision: 62af3eb2599d91c6d6f4f02ccae2d47d106be64e URL: https://github.com/llvm/llvm-project/commit/62af3eb2599d91c6d6f4f02ccae2d47d106be64e DIFF: https://github.com/llvm/llvm-project/commit/62af3eb2599d91c6d6f4f02ccae2d47d106be64e.diff LOG: [CMake][LLDB] Resolve install conflict when `LLDB_BUILD_FRAMEWORK=ON` Try to fix https://github.com/llvm/llvm-project/issues/108 Install python scripts into canonical resource path Differential revision: https://reviews.llvm.org/D116853 Added: Modified: lldb/bindings/python/CMakeLists.txt Removed: diff --git a/lldb/bindings/python/CMakeLists.txt b/lldb/bindings/python/CMakeLists.txt index cecf1e0fc095f..82a52da89a7e3 100644 --- a/lldb/bindings/python/CMakeLists.txt +++ b/lldb/bindings/python/CMakeLists.txt @@ -158,7 +158,7 @@ function(finish_swig_python swig_target lldb_python_bindings_dir lldb_python_tar # Install the LLDB python module if(LLDB_BUILD_FRAMEWORK) -set(LLDB_PYTHON_INSTALL_PATH ${LLDB_FRAMEWORK_INSTALL_DIR}/LLDB.framework/Resources/Python) +set(LLDB_PYTHON_INSTALL_PATH ${LLDB_FRAMEWORK_INSTALL_DIR}/LLDB.framework/Versions/${LLDB_FRAMEWORK_VERSION}/Resources/Python) else() set(LLDB_PYTHON_INSTALL_PATH ${LLDB_PYTHON_RELATIVE_PATH}) endif() ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [PATCH] D116853: [CMake][LLDB] Resolve install conflict when `LLDB_BUILD_FRAMEWORK=ON`
This revision was automatically updated to reflect the committed changes. Closed by commit rG62af3eb2599d: [CMake][LLDB] Resolve install conflict when `LLDB_BUILD_FRAMEWORK=ON` (authored by paperchalice, committed by JDevlieghere). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116853/new/ https://reviews.llvm.org/D116853 Files: lldb/bindings/python/CMakeLists.txt Index: lldb/bindings/python/CMakeLists.txt === --- lldb/bindings/python/CMakeLists.txt +++ lldb/bindings/python/CMakeLists.txt @@ -158,7 +158,7 @@ # Install the LLDB python module if(LLDB_BUILD_FRAMEWORK) -set(LLDB_PYTHON_INSTALL_PATH ${LLDB_FRAMEWORK_INSTALL_DIR}/LLDB.framework/Resources/Python) +set(LLDB_PYTHON_INSTALL_PATH ${LLDB_FRAMEWORK_INSTALL_DIR}/LLDB.framework/Versions/${LLDB_FRAMEWORK_VERSION}/Resources/Python) else() set(LLDB_PYTHON_INSTALL_PATH ${LLDB_PYTHON_RELATIVE_PATH}) endif() Index: lldb/bindings/python/CMakeLists.txt === --- lldb/bindings/python/CMakeLists.txt +++ lldb/bindings/python/CMakeLists.txt @@ -158,7 +158,7 @@ # Install the LLDB python module if(LLDB_BUILD_FRAMEWORK) -set(LLDB_PYTHON_INSTALL_PATH ${LLDB_FRAMEWORK_INSTALL_DIR}/LLDB.framework/Resources/Python) +set(LLDB_PYTHON_INSTALL_PATH ${LLDB_FRAMEWORK_INSTALL_DIR}/LLDB.framework/Versions/${LLDB_FRAMEWORK_VERSION}/Resources/Python) else() set(LLDB_PYTHON_INSTALL_PATH ${LLDB_PYTHON_RELATIVE_PATH}) endif() ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] 0b010ef - [lldb] Use PlatformMacOSX for Mac Catalyst
Author: Jonas Devlieghere Date: 2022-01-15T11:42:29-08:00 New Revision: 0b010ef7b653bbc9f4beef6b03e877911d206de6 URL: https://github.com/llvm/llvm-project/commit/0b010ef7b653bbc9f4beef6b03e877911d206de6 DIFF: https://github.com/llvm/llvm-project/commit/0b010ef7b653bbc9f4beef6b03e877911d206de6.diff LOG: [lldb] Use PlatformMacOSX for Mac Catalyst Use PlatformMacOSX for Mac Catalyst apps on both Intel (x86) and Apple Silicon (arm64). Added: Modified: lldb/source/Plugins/Platform/MacOSX/PlatformMacOSX.cpp Removed: diff --git a/lldb/source/Plugins/Platform/MacOSX/PlatformMacOSX.cpp b/lldb/source/Plugins/Platform/MacOSX/PlatformMacOSX.cpp index afe321538b17..9639e1b0b2cb 100644 --- a/lldb/source/Plugins/Platform/MacOSX/PlatformMacOSX.cpp +++ b/lldb/source/Plugins/Platform/MacOSX/PlatformMacOSX.cpp @@ -144,8 +144,11 @@ std::vector PlatformMacOSX::GetSupportedArchitectures() { // has a 32bits variant. result.push_back(ArchSpec("x86_64-apple-macosx")); result.push_back(ArchSpec("x86_64-apple-ios-macabi")); + result.push_back(ArchSpec("arm64-apple-ios-macabi")); + result.push_back(ArchSpec("arm64e-apple-ios-macabi")); #else x86GetSupportedArchitectures(result); + result.push_back(ArchSpec("x86_64-apple-ios-macabi")); #endif return result; } ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] 696f970 - [lldb] Set result error state in 'frame variable'
Author: Dave Lee Date: 2022-01-15T14:20:12-08:00 New Revision: 696f9706f34d76bca8f8d496eabe1a67b60e8a54 URL: https://github.com/llvm/llvm-project/commit/696f9706f34d76bca8f8d496eabe1a67b60e8a54 DIFF: https://github.com/llvm/llvm-project/commit/696f9706f34d76bca8f8d496eabe1a67b60e8a54.diff LOG: [lldb] Set result error state in 'frame variable' Ensure that errors in `frame variable` are reflected in result object. The statistics for `frame variable` show invocations as being successful, even when executing one of the error paths. This change replaces `result.GetErrorStream()` with `result.AppendError()`, which also sets the status to `eReturnStatusFailed`. Differential Revision: https://reviews.llvm.org/D116788 Recommitting after D116901 and D116863. (cherry picked from commit 2c7d10c41278181e3e45c68f28b501cd95193a8a) Added: Modified: lldb/source/Commands/CommandObjectFrame.cpp Removed: diff --git a/lldb/source/Commands/CommandObjectFrame.cpp b/lldb/source/Commands/CommandObjectFrame.cpp index 9cfe997f92274..8dd1a79d38959 100644 --- a/lldb/source/Commands/CommandObjectFrame.cpp +++ b/lldb/source/Commands/CommandObjectFrame.cpp @@ -558,18 +558,16 @@ may even involve JITing and running code in the target program.)"); } } } else if (num_matches == 0) { -result.GetErrorStream().Printf("error: no variables matched " - "the regular expression '%s'.\n", - entry.c_str()); +result.AppendErrorWithFormat( +"no variables matched the regular expression '%s'.", +entry.c_str()); } } else { if (llvm::Error err = regex.GetError()) -result.GetErrorStream().Printf( -"error: %s\n", llvm::toString(std::move(err)).c_str()); +result.AppendError(llvm::toString(std::move(err))); else -result.GetErrorStream().Printf( -"error: unknown regex error when compiling '%s'\n", -entry.c_str()); +result.AppendErrorWithFormat( +"unknown regex error when compiling '%s'", entry.c_str()); } } else // No regex, either exact variable names or variable // expressions. @@ -605,14 +603,13 @@ may even involve JITing and running code in the target program.)"); valobj_sp->GetParent() ? entry.c_str() : nullptr); valobj_sp->Dump(output_stream, options); } else { - const char *error_cstr = error.AsCString(nullptr); - if (error_cstr) -result.GetErrorStream().Printf("error: %s\n", error_cstr); + if (auto error_cstr = error.AsCString(nullptr)) +result.AppendError(error_cstr); else -result.GetErrorStream().Printf("error: unable to find any " - "variable expression path that " - "matches '%s'.\n", - entry.c_str()); +result.AppendErrorWithFormat( +"unable to find any variable expression path that matches " +"'%s'.", +entry.c_str()); } } } @@ -680,7 +677,8 @@ may even involve JITing and running code in the target program.)"); } } } - result.SetStatus(eReturnStatusSuccessFinishResult); + if (result.GetStatus() != eReturnStatusFailed) +result.SetStatus(eReturnStatusSuccessFinishResult); } if (m_option_variable.show_recognized_args) { ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [PATCH] D116972: [lldb] Run the test suite in verbose mode
gkistanova added inline comments. Comment at: zorg/buildbot/builders/LLDBBuilder.py:72 "-DCMAKE_BUILD_TYPE=" + config, +"-DLLVM_LIT_ARGS='%s'" % lit_args, "-DCMAKE_INSTALL_PREFIX=../install", To work as expected, this line should be wrapped in `WithProperties` either here, or each of the `cmake_options` items below before calling `CmakeCommand`. And you do not need extra quotation marks around %s here, even if multiple options is specified for `-DLLVM_LIT_ARGS`. Repository: rZORG LLVM Github Zorg CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116972/new/ https://reviews.llvm.org/D116972 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits