[Lldb-commits] [lldb] [lldb] Fix broken pipe error (PR #127100)
Jonas Devlieghere via lldb-commits
lldb-commits at lists.llvm.org
Thu Feb 13 11:31:05 PST 2025
================
@@ -343,6 +343,22 @@ def get_target_byte_order(self):
target = self.dbg.CreateTarget(inferior_exe_path)
return target.GetByteOrder()
+ def is_port_opened(self):
+ connect_port = self.port
+
+ err, retcode, cmd_output = self.run_platform_command(f"netstat -ltn | grep {connect_port} | grep LISTEN")
----------------
JDevlieghere wrote:
Is there a way to do this from Python? This adds a hidden dependency on `netstat`, which isn't available on all supported platforms (i.e. Windows). Similarly, don't pipe things to grep, do the filtering in Python.
https://github.com/llvm/llvm-project/pull/127100
More information about the lldb-commits
mailing list