Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(26)

Unified Diff: third_party/android_platform/development/scripts/stack_libs.py

Issue 1828953003: 🌿 Fix stack tool when packed relocations exist and built with GN (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/android_platform/development/scripts/stack ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/android_platform/development/scripts/stack_libs.py
diff --git a/third_party/android_platform/development/scripts/stack_libs.py b/third_party/android_platform/development/scripts/stack_libs.py
index ee5a67e0a0272c76c5f6a056448b23a120782ec7..6cc1a86a20bd56d04edf063f6df14d28e4332da6 100755
--- a/third_party/android_platform/development/scripts/stack_libs.py
+++ b/third_party/android_platform/development/scripts/stack_libs.py
@@ -90,8 +90,8 @@ def _FindMinLoadVaddr(lib):
return 0
-def GetLoadVaddrs(apk_dir):
- """Return a dictionary of minimum VirtAddr fields for libraries in apk_dir.
+def GetLoadVaddrs(stripped_libs_dir):
+ """Return a dict of minimum VirtAddr for libraries in the given directory.
The dictionary returned may be passed to stack_core.ConvertTrace(). In
pre-M Android releases the addresses printed by debuggerd into tombstones
@@ -99,12 +99,12 @@ def GetLoadVaddrs(apk_dir):
so that we can use it later to correct such debuggerd tombstones.
Args:
- apk_dir: Path to APK staging directory.
+ stripped_libs_dir: Path to directory containing apk's stripped libraries.
Returns:
{'libchrome.so': 12345, ...}
"""
- pathname = apk_dir + '/libs/*/*.so'
- libs = [lib for lib in glob.glob(pathname) if _HasElfHeader(lib)]
+ libs = glob.glob(os.path.join(stripped_libs_dir, '*.so'))
+ libs = [l for l in libs if _HasElfHeader(l)]
load_vaddrs = {}
for lib in libs:
« no previous file with comments | « third_party/android_platform/development/scripts/stack ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698