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. Change-Id: Ib8b5754920d2e2aa5017c29daeca59abcf4b547d
This commit is contained in:
@@ -45,7 +45,8 @@ class TraceConverter:
|
|||||||
last_frame = -1
|
last_frame = -1
|
||||||
width = "{8}"
|
width = "{8}"
|
||||||
|
|
||||||
def __init__(self): pass
|
def __init__(self):
|
||||||
|
self.UpdateAbiRegexes()
|
||||||
|
|
||||||
register_names = {
|
register_names = {
|
||||||
"arm": "r0|r1|r2|r3|r4|r5|r6|r7|r8|r9|sl|fp|ip|sp|lr|pc|cpsr",
|
"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):
|
def UpdateAbiRegexes(self):
|
||||||
if symbol.ARCH == "arm64" or symbol.ARCH == "mips64" or symbol.ARCH == "x86_64":
|
if symbol.ARCH == "arm64" or symbol.ARCH == "mips64" or symbol.ARCH == "x86_64":
|
||||||
self.width = "{16}"
|
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})")
|
self.register_line = re.compile("(([ ]*\\b(" + self.register_names[symbol.ARCH] + ")\\b +[0-9a-f]" + self.width + "){2,5})")
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user