Fix symbolication of windows crash reports

This commit is contained in:
Fedor Indutny 2024-03-05 06:17:00 -08:00 committed by GitHub
parent 8047e9cccd
commit d10126d337
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 18 additions and 0 deletions

View file

@ -0,0 +1,14 @@
diff --git a/node_modules/@electron/symbolicate-mac/index.js b/node_modules/@electron/symbolicate-mac/index.js
index 36287bb..239564a 100755
--- a/node_modules/@electron/symbolicate-mac/index.js
+++ b/node_modules/@electron/symbolicate-mac/index.js
@@ -60,7 +60,8 @@ const symbolicate = async (options) => {
async function symbolicateOne({image, offset}) {
const { debugId, path: modulePath } = image
if (!symbolCache.has(debugId)) {
- const parsed = await getSymbolFile(debugId.replace(/-/g, '') + '0', path.basename(modulePath))
+ const suffix = path.extname(modulePath) === '.pdb' ? '1' : '0';
+ const parsed = await getSymbolFile(debugId.replace(/-/g, '') + suffix, path.basename(modulePath))
symbolCache.set(debugId, parsed)
}
const parsed = symbolCache.get(debugId)

View file

@ -39,6 +39,10 @@ async function main(): Promise<void> {
if (filename.startsWith('signal-desktop-')) {
return 'electron';
}
if (filename.startsWith('Signal') && filename.endsWith('.exe')) {
return 'electron.exe.pdb';
}
return filename;
}