[lldb] Fix error : unknown error while starting lldb's C/C++ repl#153560
[lldb] Fix error : unknown error while starting lldb's C/C++ repl#153560anutosh491 merged 5 commits intollvm:mainfrom
Conversation
|
@llvm/pr-subscribers-lldb Author: Anutosh Bhat (anutosh491) ChangesFixes #153157 The proposed solution has been discussed here (#153157 (comment)) This is what we would be seeing now Full diff: https://github.com/llvm/llvm-project/pull/153560.diff 1 Files Affected:
diff --git a/lldb/source/Commands/CommandObjectExpression.cpp b/lldb/source/Commands/CommandObjectExpression.cpp
index c5b91678103d5..57b56ce7eb36e 100644
--- a/lldb/source/Commands/CommandObjectExpression.cpp
+++ b/lldb/source/Commands/CommandObjectExpression.cpp
@@ -640,9 +640,15 @@ void CommandObjectExpression::DoExecute(llvm::StringRef command,
repl_sp->SetValueObjectDisplayOptions(m_varobj_options);
}
+ if (!expr.empty()) {
+ result.GetOutputStream().Printf(
+ "Warning: trailing input is ignored in --repl mode\n");
+ }
+
IOHandlerSP io_handler_sp(repl_sp->GetIOHandler());
io_handler_sp->SetIsDone(false);
debugger.RunIOHandlerAsync(io_handler_sp);
+ return;
} else {
repl_error = Status::FromErrorStringWithFormat(
"Couldn't create a REPL for %s",
|
|
✅ With the latest revision this PR passed the C/C++ code formatter. |
|
The code makes sense. It would be good to add to the repl test that you get this warning and not the previous bogus error. |
Yes this makes sense to check the expected warning. Done |
|
Thanks for the reviews. Merging ! |
|
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/162/builds/29212 Here is the relevant piece of the build log for the reference |
|
Arghh, I'm sorry. I think I overlooked a I've tried providing a simple fix here #154339 |
|
Hi, this change broke greendragon ******************** TEST 'lldb-api :: repl/clang/TestClangREPL.py' FAILED ******************** It has been reverted with 5abad32, to make sure greendragon is green |
|
Hey @rastogishubham , I have provided a PR fixing the test in the comment above ! |
Fixes #153157
The proposed solution has been discussed here (#153157 (comment))
This is what we would be seeing now