Fix build-id lookup for libraries loaded directly from apk
Use only the part after "!" as the filename to lookup.
Test: symbolize local crash
Change-Id: I70840ffcc07dc7d449b726a91c08d12529125d78
diff --git a/scripts/stack_core.py b/scripts/stack_core.py
index 5bbc1d8..67ae536 100755
--- a/scripts/stack_core.py
+++ b/scripts/stack_core.py
@@ -509,7 +509,7 @@
if build_id:
# If we have the build_id, do a brute-force search of the symbols directory.
- basename = os.path.basename(lib)
+ basename = os.path.basename(lib).split("!")[-1]
lib = self.GetLibraryByBuildId(symbol.SYMBOLS_DIR, basename, build_id)
if not lib:
print("WARNING: Cannot find {} with build id {} in symbols directory."