[Lldb-commits] [PATCH] D70882: Add skipInitFiles option to lldb-vscode initialize
António Afonso via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Sun Dec 1 19:15:42 PST 2019
aadsm created this revision.
aadsm added reviewers: clayborg, lanza, wallace.
Herald added a project: LLDB.
Herald added a subscriber: lldb-commits.
lldb has the -x option but this doesn't exist at all for lldb-vscode. To be honest my main goal is the ability to run the lldb-vscode tests without an lldbinit file polluting it.
The DAP doesn't seem to have it (https://microsoft.github.io/debug-adapter-protocol/specification#Requests_Initialize) but it does seems like a good option to have overall.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D70882
Files:
lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/vscode.py
lldb/tools/lldb-vscode/lldb-vscode.cpp
Index: lldb/tools/lldb-vscode/lldb-vscode.cpp
===================================================================
--- lldb/tools/lldb-vscode/lldb-vscode.cpp
+++ lldb/tools/lldb-vscode/lldb-vscode.cpp
@@ -1194,7 +1194,10 @@
// }]
// }
void request_initialize(const llvm::json::Object &request) {
- g_vsc.debugger = lldb::SBDebugger::Create(true /*source_init_files*/);
+ auto arguments = request.getObject("arguments");
+ const auto skipInitFiles = GetBoolean(arguments, "skipInitFiles", true);
+ g_vsc.debugger =
+ lldb::SBDebugger::Create(!skipInitFiles /*source_init_files*/);
// Create an empty target right away since we might get breakpoint requests
// before we are given an executable to launch in a "launch" request, or a
// executable when attaching to a process by process ID in a "attach"
Index: lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/vscode.py
===================================================================
--- lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/vscode.py
+++ lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/vscode.py
@@ -548,7 +548,8 @@
'pathFormat': 'path',
'supportsRunInTerminalRequest': True,
'supportsVariablePaging': True,
- 'supportsVariableType': True
+ 'supportsVariableType': True,
+ 'skipInitFiles': True,
}
}
response = self.send_recv(command_dict)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D70882.231628.patch
Type: text/x-patch
Size: 1469 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20191202/1593571e/attachment.bin>
More information about the lldb-commits
mailing list