@@ -27,7 +27,7 @@ import { BuiltinToolPath } from '../desktop/builtin-tool-path';
2727
2828const GDB_TARGET_DEBUGGER_TYPE = 'gdbtarget' ;
2929const ARM_NONE_EABI_GDB_NAME = 'arm-none-eabi-gdb' ;
30- const ARM_NONE_EABI_GDB_BUILTIN_PATH = 'tools/gdb/arm-none-eabi-gdb' ;
30+ const ARM_NONE_EABI_GDB_BUILTIN_PATH = 'tools/gdb/bin/ arm-none-eabi-gdb' ;
3131const ARM_NONE_EABI_GDB_EXECUTABLE_ONLY_REGEXP = / ^ \s * a r m - n o n e - e a b i - g d b ( | .e x e ) \s * $ / i;
3232
3333export interface GDBTargetConfigurationSubProvider {
@@ -106,9 +106,7 @@ export class GDBTargetConfigurationProvider implements vscode.DebugConfiguration
106106 token ?: vscode . CancellationToken
107107 ) : Promise < vscode . DebugConfiguration | null | undefined > {
108108 this . logDebugConfiguration ( resolverType , debugConfiguration , 'original config' ) ;
109- logger . debug ( `${ resolverType } : Resolve GDB path` ) ;
110109 const gdbTargetConfig : GDBTargetConfiguration = debugConfiguration ;
111- this . resolveGdbPath ( gdbTargetConfig ) ;
112110 const gdbServerType = gdbTargetConfig . target ?. server ;
113111 const subprovider = this . getRelevantSubprovider ( resolverType , gdbServerType ) ;
114112 if ( ! subprovider ) {
@@ -139,6 +137,9 @@ export class GDBTargetConfigurationProvider implements vscode.DebugConfiguration
139137 debugConfiguration : vscode . DebugConfiguration ,
140138 token ?: vscode . CancellationToken
141139 ) : Promise < vscode . DebugConfiguration | null | undefined > {
140+ // Only resolve GDB path once, otherwise regexp check will fail
141+ logger . debug ( 'resolveDebugConfigurationWithSubstitutedVariables: Resolve GDB path' ) ;
142+ this . resolveGdbPath ( debugConfiguration ) ;
142143 return this . resolveDebugConfigurationByResolverType ( 'resolveDebugConfigurationWithSubstitutedVariables' , folder , debugConfiguration , token ) ;
143144 }
144145
0 commit comments