Author: Jonas Devlieghere
Date: 2026-01-06T13:57:01-06:00
New Revision: 1f5126dae135364b0df4127cf5cc62605b349ced

URL: 
https://github.com/llvm/llvm-project/commit/1f5126dae135364b0df4127cf5cc62605b349ced
DIFF: 
https://github.com/llvm/llvm-project/commit/1f5126dae135364b0df4127cf5cc62605b349ced.diff

LOG: [lldb] Don't trim expression in progress event (#174609)

Trimming the content of the progress event is the responsibility of the
consumer, not the producer. For example, when using the statusline,
there's plenty of space to show longer expressions.

rdar://166879951

Added: 
    

Modified: 
    lldb/source/Expression/UserExpression.cpp
    lldb/test/Shell/Expr/TestExecProgress.test

Removed: 
    


################################################################################
diff  --git a/lldb/source/Expression/UserExpression.cpp 
b/lldb/source/Expression/UserExpression.cpp
index 5563eba21777e..ff7a356dbbb1e 100644
--- a/lldb/source/Expression/UserExpression.cpp
+++ b/lldb/source/Expression/UserExpression.cpp
@@ -427,15 +427,10 @@ UserExpression::Execute(DiagnosticManager 
&diagnostic_manager,
                         lldb::ExpressionVariableSP &result_var) {
   Debugger *debugger =
       exe_ctx.GetTargetPtr() ? &exe_ctx.GetTargetPtr()->GetDebugger() : 
nullptr;
-  std::string details;
-  if (m_options.IsForUtilityExpr())
-    details = "LLDB utility";
-  else if (m_expr_text.size() > 15)
-    details = m_expr_text.substr(0, 14) + "…";
-  else
-    details = m_expr_text;
 
-  Progress progress("Running expression", details, {}, debugger);
+  Progress progress("Running expression",
+                    m_options.IsForUtilityExpr() ? "LLDB utility" : 
m_expr_text,
+                    {}, debugger);
 
   lldb::ExpressionResults expr_result = DoExecute(
       diagnostic_manager, exe_ctx, options, shared_ptr_to_me, result_var);

diff  --git a/lldb/test/Shell/Expr/TestExecProgress.test 
b/lldb/test/Shell/Expr/TestExecProgress.test
index 3f0ae9ffe5633..5706b6189f528 100644
--- a/lldb/test/Shell/Expr/TestExecProgress.test
+++ b/lldb/test/Shell/Expr/TestExecProgress.test
@@ -5,4 +5,4 @@ expr 1 // And a very long comment.
 quit
 
 # CHECK: {{title = "Running expression", details = "1"}}
-# CHECK: {{title = "Running expression", details = "1 // And a ver…"}}
+# CHECK: {{title = "Running expression", details = "1 // And a very long 
comment."}}


        
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to