-
Notifications
You must be signed in to change notification settings - Fork 14.4k
[lldb] Extend information for failed connection for gdb server #139916
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: None (ita-sc) ChangesBefore:
After the patch:
Full diff: https://github.com/llvm/llvm-project/pull/139916.diff 1 Files Affected:
diff --git a/lldb/source/Host/common/TCPSocket.cpp b/lldb/source/Host/common/TCPSocket.cpp
index d3282ab58b818..4148ad67b04bf 100644
--- a/lldb/source/Host/common/TCPSocket.cpp
+++ b/lldb/source/Host/common/TCPSocket.cpp
@@ -169,7 +169,8 @@ Status TCPSocket::Connect(llvm::StringRef name) {
return error;
}
- error = Status::FromErrorString("Failed to connect port");
+ error = Status::FromErrorStringWithFormatv("Failed to connect {0}:{1}",
+ host_port->hostname, host_port->port);
return error;
}
|
✅ With the latest revision this PR passed the C/C++ code formatter. |
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 modulo (pre-existing) typo.
Before: ``` (lldb) r error: connect remote failed (Failed to connect port) error: Failed to connect port ``` After the patch: ``` (lldb) r error: connect remote failed (Failed to connect to localhost:47140) error: Failed to connect to localhost:47140 ```
Thanks for review. |
…139916) Before: ``` (lldb) r error: connect remote failed (Failed to connect port) error: Failed to connect port ``` After the patch: ``` (lldb) r error: connect remote failed (Failed to connect localhost:47140) error: Failed to connect localhost:47140 ```
…139916) Before: ``` (lldb) r error: connect remote failed (Failed to connect port) error: Failed to connect port ``` After the patch: ``` (lldb) r error: connect remote failed (Failed to connect localhost:47140) error: Failed to connect localhost:47140 ```
Before:
After the patch: