From 30da67da1a72859faf92b802d7cbf8e595f6c6b8 Mon Sep 17 00:00:00 2001 From: Fedor Indutny <79877362+indutny-signal@users.noreply.github.com> Date: Mon, 11 Sep 2023 20:25:17 +0200 Subject: [PATCH] Add support for symbolicating raw .dmp files --- ts/scripts/symbolicate-crash-reports.ts | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/ts/scripts/symbolicate-crash-reports.ts b/ts/scripts/symbolicate-crash-reports.ts index 5240cb6543..bed6931418 100644 --- a/ts/scripts/symbolicate-crash-reports.ts +++ b/ts/scripts/symbolicate-crash-reports.ts @@ -108,7 +108,17 @@ async function symbolicate( await fs.mkdir(tmpDir, { recursive: true }); const encoded = await fs.readFile(fileName); - const { reports } = Proto.CrashReportList.decode(encoded); + let reports: ReadonlyArray; + if (fileName.endsWith('.dmp')) { + reports = [ + { + filename: 'report.dmp', + content: encoded, + }, + ]; + } else { + ({ reports } = Proto.CrashReportList.decode(encoded)); + } const { name: prefix } = path.parse(fileName);