summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorBrigid Smith <brigidsmith@google.com>2014-07-15 13:47:07 -0700
committerElliott Hughes <enh@google.com>2014-07-29 16:13:18 -0700
commitf893e743b6e462bf0d68b51693158423c558ec98 (patch)
tree4a65c201a435658259cab08c0bd9dd4cd88064ed /scripts
parenta38b253ebbce0305f7fc65218941a9c248e54c5a (diff)
downloadandroid_development-f893e743b6e462bf0d68b51693158423c558ec98.tar.gz
android_development-f893e743b6e462bf0d68b51693158423c558ec98.tar.bz2
android_development-f893e743b6e462bf0d68b51693158423c558ec98.zip
Stack tool 32/64 bit compatibility fixes.
Left the default symbol.ARCH value intact and changed stack_core instead so that it will assume the ABI is arm until it sees an ABI line. This allows compatibility for people who are used to pasting portions of a tombstone instead of the whole thing (assuming said tombstone is arm) while additionally supporting other architectures if a whole tombstone is pasted in. (cherry picked from commit 15142f793a5418be7337846c1b3b628d90716f3e) Change-Id: Ide73171fc4e513b39bee74e2270252c3b32e23cd
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/stack_core.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/scripts/stack_core.py b/scripts/stack_core.py
index 6b1e11eea..1eb0c29d5 100755
--- a/scripts/stack_core.py
+++ b/scripts/stack_core.py
@@ -45,7 +45,8 @@ class TraceConverter:
last_frame = -1
width = "{8}"
- def __init__(self): pass
+ def __init__(self):
+ self.UpdateAbiRegexes()
register_names = {
"arm": "r0|r1|r2|r3|r4|r5|r6|r7|r8|r9|sl|fp|ip|sp|lr|pc|cpsr",
@@ -58,6 +59,8 @@ class TraceConverter:
def UpdateAbiRegexes(self):
if symbol.ARCH == "arm64" or symbol.ARCH == "mips64" or symbol.ARCH == "x86_64":
self.width = "{16}"
+ else:
+ self.width = "{8}"
self.register_line = re.compile("(([ ]*\\b(" + self.register_names[symbol.ARCH] + ")\\b +[0-9a-f]" + self.width + "){2,5})")