-
Notifications
You must be signed in to change notification settings - Fork 14.8k
[lldb] Fix error : unknown error while starting lldb's C/C++ repl #153560
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
@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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
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