Skip to content

Commit 4ee41b7

Browse files
Integrate from LLVM at llvm/llvm-project@73ab0c0
1 parent 74ec94d commit 4ee41b7

File tree

3 files changed

+27
-13
lines changed

3 files changed

+27
-13
lines changed

package-lock.json

+7-6
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+11-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "lldb-dap",
33
"displayName": "LLDB DAP",
4-
"version": "0.2.9",
4+
"version": "0.2.10",
55
"publisher": "llvm-vs-code-extensions",
66
"homepage": "https://lldb.llvm.org",
77
"description": "LLDB debugging from VSCode",
@@ -27,7 +27,7 @@
2727
"Debuggers"
2828
],
2929
"devDependencies": {
30-
"@types/node": "^18.11.18",
30+
"@types/node": "^18.19.41",
3131
"@types/vscode": "1.75.0",
3232
"@vscode/vsce": "^3.2.2",
3333
"prettier-plugin-curly": "^0.3.1",
@@ -86,7 +86,7 @@
8686
"default": {},
8787
"description": "The environment of the lldb-dap process.",
8888
"additionalProperties": {
89-
"type": "string"
89+
"type": "string"
9090
}
9191
}
9292
}
@@ -152,6 +152,10 @@
152152
"program"
153153
],
154154
"properties": {
155+
"debugAdapterExecutable": {
156+
"type": "string",
157+
"markdownDescription": "The absolute path to the LLDB debug adapter executable to use."
158+
},
155159
"program": {
156160
"type": "string",
157161
"description": "Path to the program to debug."
@@ -338,6 +342,10 @@
338342
},
339343
"attach": {
340344
"properties": {
345+
"debugAdapterExecutable": {
346+
"type": "string",
347+
"markdownDescription": "The absolute path to the LLDB debug adapter executable to use."
348+
},
341349
"program": {
342350
"type": "string",
343351
"description": "Path to the program to attach to."

src-ts/debug-adapter-factory.ts

+9-4
Original file line numberDiff line numberDiff line change
@@ -50,13 +50,13 @@ async function findDAPExecutable(): Promise<string | undefined> {
5050
const executable = process.platform === "win32" ? "lldb-dap.exe" : "lldb-dap";
5151

5252
// Prefer lldb-dap from Xcode on Darwin.
53-
const xcrun_dap = findWithXcrun(executable);
53+
const xcrun_dap = await findWithXcrun(executable);
5454
if (xcrun_dap) {
5555
return xcrun_dap;
5656
}
5757

5858
// Find lldb-dap in the user's path.
59-
const path_dap = findInPath(executable);
59+
const path_dap = await findInPath(executable);
6060
if (path_dap) {
6161
return path_dap;
6262
}
@@ -67,12 +67,17 @@ async function findDAPExecutable(): Promise<string | undefined> {
6767
async function getDAPExecutable(
6868
session: vscode.DebugSession,
6969
): Promise<string | undefined> {
70+
// Check if the executable was provided in the launch configuration.
71+
const launchConfigPath = session.configuration["debugAdapterExecutable"];
72+
if (typeof launchConfigPath === "string" && launchConfigPath.length !== 0) {
73+
return launchConfigPath;
74+
}
75+
76+
// Check if the executable was provided in the extension's configuration.
7077
const config = vscode.workspace.getConfiguration(
7178
"lldb-dap",
7279
session.workspaceFolder,
7380
);
74-
75-
// Prefer the explicitly specified path in the extension's configuration.
7681
const configPath = config.get<string>("executable-path");
7782
if (configPath && configPath.length !== 0) {
7883
return configPath;

0 commit comments

Comments
 (0)