diff options
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/tools')
-rw-r--r-- | lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/lldbvscode_testcase.py | 3 | ||||
-rw-r--r-- | lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/vscode.py | 16 |
2 files changed, 10 insertions, 9 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/lldbvscode_testcase.py b/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/lldbvscode_testcase.py index c66c6bb7af6..662a0570871 100644 --- a/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/lldbvscode_testcase.py +++ b/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/lldbvscode_testcase.py @@ -11,7 +11,8 @@ class VSCodeTestCaseBase(TestBase): '''Create the Visual Studio Code debug adaptor''' self.assertTrue(os.path.exists(self.lldbVSCodeExec), 'lldb-vscode must exist') - self.vscode = vscode.DebugAdaptor(executable=self.lldbVSCodeExec) + self.vscode = vscode.DebugAdaptor( + executable=self.lldbVSCodeExec, init_commands=Base.setUpCommands()) def build_and_create_debug_adaptor(self): self.build() diff --git a/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/vscode.py b/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/vscode.py index adb8ad50bff..638c038e169 100644 --- a/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/vscode.py +++ b/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/vscode.py @@ -99,7 +99,7 @@ def read_packet_thread(vs_comm): class DebugCommunication(object): - def __init__(self, recv, send): + def __init__(self, recv, send, init_commands): self.trace_file = None self.send = send self.recv = recv @@ -118,6 +118,7 @@ class DebugCommunication(object): self.output = {} self.configuration_done_sent = False self.frame_scopes = {} + self.init_commands = init_commands @classmethod def encode_content(cls, s): @@ -447,8 +448,7 @@ class DebugCommunication(object): args_dict['waitFor'] = waitFor if trace: args_dict['trace'] = trace - args_dict['initCommands'] = [ - 'settings set symbols.enable-external-lookup false'] + args_dict['initCommands'] = self.init_commands if initCommands: args_dict['initCommands'].extend(initCommands) if preRunCommands: @@ -578,8 +578,7 @@ class DebugCommunication(object): args_dict['shellExpandArguments'] = shellExpandArguments if trace: args_dict['trace'] = trace - args_dict['initCommands'] = [ - 'settings set symbols.enable-external-lookup false'] + args_dict['initCommands'] = self.init_commands if initCommands: args_dict['initCommands'].extend(initCommands) if preRunCommands: @@ -822,7 +821,7 @@ class DebugCommunication(object): class DebugAdaptor(DebugCommunication): - def __init__(self, executable=None, port=None): + def __init__(self, executable=None, port=None, init_commands=[]): self.process = None if executable is not None: self.process = subprocess.Popen([executable], @@ -830,11 +829,12 @@ class DebugAdaptor(DebugCommunication): stdout=subprocess.PIPE, stderr=subprocess.PIPE) DebugCommunication.__init__(self, self.process.stdout, - self.process.stdin) + self.process.stdin, init_commands) elif port is not None: s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) s.connect(('127.0.0.1', port)) - DebugCommunication.__init__(self, s.makefile('r'), s.makefile('w')) + DebugCommunication.__init__(self, s.makefile('r'), s.makefile('w'), + init_commands) def get_pid(self): if self.process: |