[Lldb-commits] [lldb] Extend information for failed connection for gdb server (PR #139916)
via lldb-commits
lldb-commits at lists.llvm.org
Wed May 14 07:49:06 PDT 2025
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-lldb
Author: None (ita-sc)
<details>
<summary>Changes</summary>
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
```
---
Full diff: https://github.com/llvm/llvm-project/pull/139916.diff
1 Files Affected:
- (modified) lldb/source/Host/common/TCPSocket.cpp (+2-1)
``````````diff
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;
}
``````````
</details>
https://github.com/llvm/llvm-project/pull/139916
More information about the lldb-commits
mailing list