Skip to content

Commit f72057e

Browse files
committed
Tolerate lldb-mi installations without lldb
We avoid attempting to invoke lldb when we know it does not exist to reduce noise in the error log.
1 parent b29198a commit f72057e

File tree

1 file changed

+8
-1
lines changed
  • llvm/org.eclipse.cdt.llvm.dsf.lldb.core/src/org/eclipse/cdt/llvm/dsf/lldb/core/internal/launching

1 file changed

+8
-1
lines changed

llvm/org.eclipse.cdt.llvm.dsf.lldb.core/src/org/eclipse/cdt/llvm/dsf/lldb/core/internal/launching/LLDBLaunch.java

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
11
/*******************************************************************************
2-
* Copyright (c) 2016 Ericsson.
2+
* Copyright (c) 2016, 2025 Ericsson and others.
33
*
44
* This program and the accompanying materials
55
* are made available under the terms of the Eclipse Public License 2.0
66
* which accompanies this distribution, and is available at
77
* https://www.eclipse.org/legal/epl-2.0/
88
*
99
* SPDX-License-Identifier: EPL-2.0
10+
* Contributors:
11+
* Ericsson - Initial implementation
12+
* John Dallaway - Tolerate lldb-mi installations without lldb (#1186)
1013
*******************************************************************************/
1114

1215
package org.eclipse.cdt.llvm.dsf.lldb.core.internal.launching;
@@ -161,7 +164,11 @@ private void computeLLDBVersions() throws CoreException {
161164
lastSegment = lastSegment.replace(ILLDBConstants.LLDB_MI_EXECUTABLE_NAME,
162165
ILLDBConstants.LLDB_EXECUTABLE_NAME);
163166
}
167+
boolean isLldbMiAbsolute = lldbMiPath.isAbsolute() && lldbMiPath.toFile().exists();
164168
lldbMiPath = lldbMiPath.removeLastSegments(1).append(lastSegment);
169+
if (isLldbMiAbsolute && !lldbMiPath.toFile().exists()) {
170+
return; // lldb is not found in the containing folder of lldb-mi
171+
}
165172

166173
String cmd = lldbMiPath + " --version"; //$NON-NLS-1$
167174

0 commit comments

Comments
 (0)