Add support for symbolicating raw .dmp files

This commit is contained in:
Fedor Indutny 2023-09-11 20:25:17 +02:00 committed by GitHub
parent 90d36350a7
commit 30da67da1a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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<Proto.ICrashReport>;
if (fileName.endsWith('.dmp')) {
reports = [
{
filename: 'report.dmp',
content: encoded,
},
];
} else {
({ reports } = Proto.CrashReportList.decode(encoded));
}
const { name: prefix } = path.parse(fileName);