From 3b4ce731fbcc6490da95d8091b384c3ddb3c70d9 Mon Sep 17 00:00:00 2001 From: Alex Langford Date: Mon, 19 Aug 2019 20:17:27 +0000 Subject: [lldb-vscode] add `launchCommands` to handle launch specific commands Summary: This can help `lldb-vscode` handle launch commands associate with remote platform attach request have field `attachCommands` to handle attach specific commands add a corresponding one for launch request if no launch command is provided, create a new target and launch; otherwise, execute the launch command Differential Revision: https://reviews.llvm.org/D65363 Patch by Wanyi Ye llvm-svn: 369296 --- lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/vscode.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/vscode.py') 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 638c038e169..b4e21989463 100644 --- a/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/vscode.py +++ b/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/vscode.py @@ -558,7 +558,7 @@ class DebugCommunication(object): disableSTDIO=False, shellExpandArguments=False, trace=False, initCommands=None, preRunCommands=None, stopCommands=None, exitCommands=None, sourcePath=None, - debuggerRoot=None): + debuggerRoot=None, launchCommands=None): args_dict = { 'program': program } @@ -591,6 +591,8 @@ class DebugCommunication(object): args_dict['sourcePath'] = sourcePath if debuggerRoot: args_dict['debuggerRoot'] = debuggerRoot + if launchCommands: + args_dict['launchCommands'] = launchCommands command_dict = { 'command': 'launch', 'type': 'request', -- cgit v1.2.3