Skip to content

Commit d2bd18a

Browse files
authored
don't strip underscores when demangling (#12159)
1 parent f3cbf12 commit d2bd18a

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Extension/src/LanguageServer/extension.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,6 @@ function sendActivationTelemetry(): void {
144144
* activate: set up the extension for language services
145145
*/
146146
export async function activate(): Promise<void> {
147-
148147
sendActivationTelemetry();
149148
const checkForConflictingExtensions: PersistentState<boolean> = new PersistentState<boolean>("CPP." + util.packageJson.version + ".checkForConflictingExtensions", true);
150149
if (checkForConflictingExtensions.Value) {
@@ -1156,7 +1155,10 @@ async function handleCrashFileRead(crashDirectory: string, crashFile: string, er
11561155
const startPos2: number = startPos + 1;
11571156
let funcStr: string = line.substring(startPos2, offsetPos);
11581157
if (filtPath) {
1159-
const ret: util.ProcessReturnType | undefined = await util.spawnChildProcess(filtPath, [funcStr], undefined, true).catch(logAndReturn.undefined);
1158+
let ret: util.ProcessReturnType | undefined = await util.spawnChildProcess(filtPath, ["--no-strip-underscore", funcStr], undefined, true).catch(logAndReturn.undefined);
1159+
if (ret?.output === funcStr) {
1160+
ret = await util.spawnChildProcess(filtPath, [funcStr], undefined, true).catch(logAndReturn.undefined);
1161+
}
11601162
if (ret !== undefined) {
11611163
funcStr = ret.output;
11621164
funcStr = funcStr.replace(/std::(?:__1|__cxx11)/g, "std"); // simplify std namespaces.

0 commit comments

Comments
 (0)