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

Unified Diff: build/android/symbolize.py

Issue 19010004: Update build/android/symbolize.py to match base/debug/stack_trace_android.cc format. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 5 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 | « no previous file | build/android/symbolize_test.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/symbolize.py
diff --git a/build/android/symbolize.py b/build/android/symbolize.py
index d589a05cfe1ae4f9daec711dcfdb55e3a941735b..b25261b19fd525faa2ade6e67eae9e101f65bc32 100755
--- a/build/android/symbolize.py
+++ b/build/android/symbolize.py
@@ -23,9 +23,9 @@ sys.path.insert(0,
import symbol
# Sample output from base/debug/stack_trace_android.cc
-#00 pc 000634c1 /data/app-lib/org.chromium.native_test-1/libbase_unittests.so
-TRACE_LINE = re.compile('(?P<frame>\#[0-9]+) pc (?P<addr>[0-9a-f]{8,8}) '
- '(?P<lib>[^\r\n \t]+)')
+#00 0x693cd34f /path/to/some/libfoo.so+0x0007434f
+TRACE_LINE = re.compile('(?P<frame>\#[0-9]+ 0x[0-9a-f]{8,8}) '
+ '(?P<lib>[^+]+)\+0x(?P<addr>[0-9a-f]{8,8})')
class Symbolizer(object):
def __init__(self, file_in, file_out):
@@ -65,9 +65,13 @@ class Symbolizer(object):
continue
pre = line[0:match.start('frame')]
- post = line[match.end('lib'):]
+ post = line[match.end('addr'):]
- self.file_out.write('%s%s pc %s %s%s' % (pre, frame, addr, sym, post))
+ self.file_out.write(pre)
+ self.file_out.write(frame)
+ self.file_out.write(' ')
+ self.file_out.write(sym)
+ self.file_out.write(post)
self.file_out.flush()
« no previous file with comments | « no previous file | build/android/symbolize_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698