Differential D61687 Diff 214985 packages/Python/lldbsuite/test/tools/lldb-server/gdbremote_testcase.py
Changeset View
Changeset View
Standalone View
Standalone View
packages/Python/lldbsuite/test/tools/lldb-server/gdbremote_testcase.py
Show First 20 Lines • Show All 227 Lines • ▼ Show 20 Lines | def get_stub_port_from_named_socket(self, read_timeout_seconds=5): | ||||
return stub_port | return stub_port | ||||
def init_llgs_test(self, use_named_pipe=True): | def init_llgs_test(self, use_named_pipe=True): | ||||
if lldb.remote_platform: | if lldb.remote_platform: | ||||
# Remote platforms don't support named pipe based port negotiation | # Remote platforms don't support named pipe based port negotiation | ||||
use_named_pipe = False | use_named_pipe = False | ||||
triple = self.dbg.GetSelectedPlatform().GetTriple() | |||||
if re.match(".*-.*-windows", triple): | |||||
self.skipTest("Remotely testing is not supported on Windows yet.") | |||||
# Grab the ppid from /proc/[shell pid]/stat | # Grab the ppid from /proc/[shell pid]/stat | ||||
err, retcode, shell_stat = self.run_platform_command( | err, retcode, shell_stat = self.run_platform_command( | ||||
"cat /proc/$$/stat") | "cat /proc/$$/stat") | ||||
self.assertTrue( | self.assertTrue( | ||||
err.Success() and retcode == 0, | err.Success() and retcode == 0, | ||||
"Failed to read file /proc/$$/stat: %s, retcode: %d" % | "Failed to read file /proc/$$/stat: %s, retcode: %d" % | ||||
(err.GetCString(), | (err.GetCString(), | ||||
retcode)) | retcode)) | ||||
Show All 9 Lines | def init_llgs_test(self, use_named_pipe=True): | ||||
err.GetCString(), | err.GetCString(), | ||||
retcode)) | retcode)) | ||||
exe = ls_output.split()[-1] | exe = ls_output.split()[-1] | ||||
# If the binary has been deleted, the link name has " (deleted)" appended. | # If the binary has been deleted, the link name has " (deleted)" appended. | ||||
# Remove if it's there. | # Remove if it's there. | ||||
self.debug_monitor_exe = re.sub(r' \(deleted\)$', '', exe) | self.debug_monitor_exe = re.sub(r' \(deleted\)$', '', exe) | ||||
else: | else: | ||||
# Need to figure out how to create a named pipe on Windows. | |||||
if platform.system() == 'Windows': | |||||
use_named_pipe = False | |||||
self.debug_monitor_exe = get_lldb_server_exe() | self.debug_monitor_exe = get_lldb_server_exe() | ||||
if not self.debug_monitor_exe: | if not self.debug_monitor_exe: | ||||
self.skipTest("lldb-server exe not found") | self.skipTest("lldb-server exe not found") | ||||
self.debug_monitor_extra_args = ["gdbserver"] | self.debug_monitor_extra_args = ["gdbserver"] | ||||
self.setUpServerLogging(is_llgs=True) | self.setUpServerLogging(is_llgs=True) | ||||
if use_named_pipe: | if use_named_pipe: | ||||
▲ Show 20 Lines • Show All 1,400 Lines • Show Last 20 Lines |