[Lldb-commits] [lldb] 2c9093e - Revert "Make sure Target::EvaluateExpression() passes up an error instead of silently dropping it."
Adrian Prantl via lldb-commits
lldb-commits at lists.llvm.org
Mon Oct 17 17:28:03 PDT 2022
Author: Adrian Prantl
Date: 2022-10-17T17:27:54-07:00
New Revision: 2c9093e649c4078c1083f489b72dda7ad54baea5
URL: https://github.com/llvm/llvm-project/commit/2c9093e649c4078c1083f489b72dda7ad54baea5
DIFF: https://github.com/llvm/llvm-project/commit/2c9093e649c4078c1083f489b72dda7ad54baea5.diff
LOG: Revert "Make sure Target::EvaluateExpression() passes up an error instead of silently dropping it."
This reverts commit a31a5da3c7d7393749a43dbc678fd28fb94d07f6.
Added:
Modified:
lldb/source/Commands/CommandObjectExpression.cpp
lldb/source/Target/Target.cpp
Removed:
################################################################################
diff --git a/lldb/source/Commands/CommandObjectExpression.cpp b/lldb/source/Commands/CommandObjectExpression.cpp
index be306f20881d2..b7d129e1d7df6 100644
--- a/lldb/source/Commands/CommandObjectExpression.cpp
+++ b/lldb/source/Commands/CommandObjectExpression.cpp
@@ -461,8 +461,6 @@ bool CommandObjectExpression::EvaluateExpression(llvm::StringRef expr,
result.SetStatus(eReturnStatusFailed);
}
}
- } else {
- error_stream.Printf("error: unknown error\n");
}
return (success != eExpressionSetupError &&
diff --git a/lldb/source/Target/Target.cpp b/lldb/source/Target/Target.cpp
index f1a311b7252cb..c567407757e39 100644
--- a/lldb/source/Target/Target.cpp
+++ b/lldb/source/Target/Target.cpp
@@ -26,7 +26,6 @@
#include "lldb/Core/StreamFile.h"
#include "lldb/Core/StructuredDataImpl.h"
#include "lldb/Core/ValueObject.h"
-#include "lldb/Core/ValueObjectConstResult.h"
#include "lldb/Expression/DiagnosticManager.h"
#include "lldb/Expression/ExpressionVariable.h"
#include "lldb/Expression/REPL.h"
@@ -2529,10 +2528,6 @@ ExpressionResults Target::EvaluateExpression(
execution_results = UserExpression::Evaluate(exe_ctx, options, expr, prefix,
result_valobj_sp, error,
fixed_expression, ctx_obj);
- // Pass up the error by wrapping it inside an error result.
- if (error.Fail() && !result_valobj_sp)
- result_valobj_sp = ValueObjectConstResult::Create(
- exe_ctx.GetBestExecutionContextScope(), error);
}
if (execution_results == eExpressionCompleted)
More information about the lldb-commits
mailing list