From 0ffc78c55fb1139cece6c3102785127ff9cd9002 Mon Sep 17 00:00:00 2001 From: Bobby Galli Date: Mon, 15 Apr 2024 23:23:52 -0400 Subject: [PATCH] fix: shared object matching bug --- spec/sym.spec.ts | 2 +- src/sym.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/spec/sym.spec.ts b/spec/sym.spec.ts index 6b9c663..1126ced 100644 --- a/spec/sym.spec.ts +++ b/spec/sym.spec.ts @@ -18,7 +18,7 @@ describe('getSymFileInfo', () => { }); it('should get module name for file with line feeds', async () => { - const expected = 'libc++_shared'; + const expected = 'libc++_shared.so'; const { moduleName } = await getSymFileInfo('./spec/support/android.sym'); diff --git a/src/sym.ts b/src/sym.ts index 9d8a7a5..ab996a3 100644 --- a/src/sym.ts +++ b/src/sym.ts @@ -25,7 +25,7 @@ export async function getSymFileInfo(path: string): Promise<{ dbgId: string, mod // For now, remove some module name extensions to satisfy the minidump-stackwalker symbol lookup. function removeIgnoredExtensions(moduleName: string): string { // We've seen .pdb, .so, .so.0, and .so.6 in the module lookup - const ignoredExtensions = [/\.pdb$/gm, /\.so\.+.*$/gm]; + const ignoredExtensions = [/\.pdb$/gm, /\.so\.?.*$/gm]; if (ignoredExtensions.some((regex) => regex.test(moduleName))) { return moduleName;