Skip to content

[lldb] Improve command status when dwim-print has no result #114478

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

kastiglione
Copy link
Contributor

@kastiglione kastiglione commented Oct 31, 2024

When an expression produces no result, set dwim-print status to eReturnStatusSuccessFinishNoResult.

@llvmbot
Copy link
Member

llvmbot commented Oct 31, 2024

@llvm/pr-subscribers-lldb

Author: Dave Lee (kastiglione)

Changes

Full diff: https://github.com/llvm/llvm-project/pull/114478.diff

1 Files Affected:

  • (modified) lldb/source/Commands/CommandObjectDWIMPrint.cpp (+1-1)
diff --git a/lldb/source/Commands/CommandObjectDWIMPrint.cpp b/lldb/source/Commands/CommandObjectDWIMPrint.cpp
index f5aa6a287b6f46..76bed100dc7291 100644
--- a/lldb/source/Commands/CommandObjectDWIMPrint.cpp
+++ b/lldb/source/Commands/CommandObjectDWIMPrint.cpp
@@ -231,7 +231,7 @@ void CommandObjectDWIMPrint::DoExecute(StringRef command,
     if (valobj_sp->GetError().GetError() != UserExpression::kNoResult)
       dump_val_object(*valobj_sp);
     else
-      result.SetStatus(eReturnStatusSuccessFinishResult);
+      result.SetStatus(eReturnStatusSuccessFinishNoResult);
 
     if (suppress_result)
       if (auto result_var_sp =

@kastiglione kastiglione merged commit 2bd21b2 into llvm:main Nov 1, 2024
9 checks passed
@kastiglione kastiglione deleted the lldb-Improve-command-status-when-dwim-print-has-no-result branch November 1, 2024 20:39
Copy link
Collaborator

@adrian-prantl adrian-prantl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kastiglione Is there a way to turn this into a test? Apparently this works:

(lldb) p ;
(lldb) 

smallp-o-p pushed a commit to smallp-o-p/llvm-project that referenced this pull request Nov 3, 2024
)

When an expression produces no result, set `dwim-print` status to 
`eReturnStatusSuccessFinishNoResult`.
NoumanAmir657 pushed a commit to NoumanAmir657/llvm-project that referenced this pull request Nov 4, 2024
)

When an expression produces no result, set `dwim-print` status to 
`eReturnStatusSuccessFinishNoResult`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants