From 6a1af252cf1ccf310c07eda5f21821b63377085f Mon Sep 17 00:00:00 2001 From: Haneef Mohammed Date: Wed, 6 Sep 2023 16:56:29 -0700 Subject: [PATCH] Force forward slashes on Windows for static variable creation --- package-lock.json | 4 ++-- src/gdb.ts | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/package-lock.json b/package-lock.json index 271bdda5..f8d20d29 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "cortex-debug", - "version": "1.12.1-pre1", + "version": "1.12.1-pre5", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "cortex-debug", - "version": "1.12.1-pre1", + "version": "1.12.1-pre5", "license": "MIT", "dependencies": { "@vscode/extension-telemetry": "^0.4.7", diff --git a/src/gdb.ts b/src/gdb.ts index e0d24f95..902b1edd 100755 --- a/src/gdb.ts +++ b/src/gdb.ts @@ -2779,6 +2779,10 @@ export class GDBDebugSession extends LoggingDebugSession { hasher.update(file || ''); const fHash = hasher.digest('hex'); + if (os.platform() === 'win32') { + file = file.replace(/\\/g, '/'); + } + for (const displayName of staticNames) { const exprName = `'${file}'::${displayName}`; const varObjName = this.createStaticVarName(fHash, exprName);