diff options
author | Dave Lee <davelee.com@gmail.com> | 2022-01-09 14:12:47 -0800 |
---|---|---|
committer | Dave Lee <davelee.com@gmail.com> | 2022-01-09 14:12:47 -0800 |
commit | 08f70adedb775ce6d41a1f8ad75c4bac225efb5b (patch) | |
tree | 3d4b37e9f5a2bba676bf66cc6956e715e5acb974 /lldb/source/Commands/CommandObjectFrame.cpp | |
parent | 5d3bd7f36092c88265dc698a970078184425f67c (diff) | |
download | llvm-08f70adedb775ce6d41a1f8ad75c4bac225efb5b.zip llvm-08f70adedb775ce6d41a1f8ad75c4bac225efb5b.tar.gz llvm-08f70adedb775ce6d41a1f8ad75c4bac225efb5b.tar.bz2 |
Revert "[lldb] Set result error state in 'frame variable'"
This reverts commit 2bcff220bf1e372e91491911fe0bb76c4c4bbef8.
Diffstat (limited to 'lldb/source/Commands/CommandObjectFrame.cpp')
-rw-r--r-- | lldb/source/Commands/CommandObjectFrame.cpp | 30 |
1 files changed, 16 insertions, 14 deletions
diff --git a/lldb/source/Commands/CommandObjectFrame.cpp b/lldb/source/Commands/CommandObjectFrame.cpp index 8dd1a79..9cfe997 100644 --- a/lldb/source/Commands/CommandObjectFrame.cpp +++ b/lldb/source/Commands/CommandObjectFrame.cpp @@ -558,16 +558,18 @@ protected: } } } else if (num_matches == 0) { - result.AppendErrorWithFormat( - "no variables matched the regular expression '%s'.", - entry.c_str()); + result.GetErrorStream().Printf("error: no variables matched " + "the regular expression '%s'.\n", + entry.c_str()); } } else { if (llvm::Error err = regex.GetError()) - result.AppendError(llvm::toString(std::move(err))); + result.GetErrorStream().Printf( + "error: %s\n", llvm::toString(std::move(err)).c_str()); else - result.AppendErrorWithFormat( - "unknown regex error when compiling '%s'", entry.c_str()); + result.GetErrorStream().Printf( + "error: unknown regex error when compiling '%s'\n", + entry.c_str()); } } else // No regex, either exact variable names or variable // expressions. @@ -603,13 +605,14 @@ protected: valobj_sp->GetParent() ? entry.c_str() : nullptr); valobj_sp->Dump(output_stream, options); } else { - if (auto error_cstr = error.AsCString(nullptr)) - result.AppendError(error_cstr); + const char *error_cstr = error.AsCString(nullptr); + if (error_cstr) + result.GetErrorStream().Printf("error: %s\n", error_cstr); else - result.AppendErrorWithFormat( - "unable to find any variable expression path that matches " - "'%s'.", - entry.c_str()); + result.GetErrorStream().Printf("error: unable to find any " + "variable expression path that " + "matches '%s'.\n", + entry.c_str()); } } } @@ -677,8 +680,7 @@ protected: } } } - if (result.GetStatus() != eReturnStatusFailed) - result.SetStatus(eReturnStatusSuccessFinishResult); + result.SetStatus(eReturnStatusSuccessFinishResult); } if (m_option_variable.show_recognized_args) { |