summaryrefslogtreecommitdiffstats
path: root/lldb/examples/python/symbolication.py
diff options
context:
space:
mode:
authorGreg Clayton <gclayton@apple.com>2013-04-04 23:36:51 +0000
committerGreg Clayton <gclayton@apple.com>2013-04-04 23:36:51 +0000
commita16cb16a58c1bcdc15bd932bce34c15123c106ca (patch)
tree33c55e64c8aa9b0ecc0b731b423f14bca5677f04 /lldb/examples/python/symbolication.py
parent9812634c5243b124d4c63641dc6d6c9452b957ba (diff)
downloadbcm5719-llvm-a16cb16a58c1bcdc15bd932bce34c15123c106ca.tar.gz
bcm5719-llvm-a16cb16a58c1bcdc15bd932bce34c15123c106ca.zip
<rdar://problem/13477795>
crashlog.py was always subtracting 1 to point to the previous instruction when symbolicating ARM backtraces. Many times the backtraces will include bit zero set to 1 to indicate thumb, so we need to make sure we mask the address and then backup one for non frame zero frames. llvm-svn: 178812
Diffstat (limited to 'lldb/examples/python/symbolication.py')
-rwxr-xr-xlldb/examples/python/symbolication.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/lldb/examples/python/symbolication.py b/lldb/examples/python/symbolication.py
index f36396112c9..e4c79b6c432 100755
--- a/lldb/examples/python/symbolication.py
+++ b/lldb/examples/python/symbolication.py
@@ -211,6 +211,7 @@ class Image:
self.module = None
self.symfile = None
self.slide = None
+
def dump(self, prefix):
print "%s%s" % (prefix, self)
@@ -377,7 +378,7 @@ class Symbolicator:
"""A class the represents the information needed to symbolicate addresses in a program"""
self.target = None
self.images = list() # a list of images to be used when symbolicating
-
+ self.addr_mask = 0xffffffffffffffff
def __str__(self):
s = "Symbolicator:\n"
@@ -412,6 +413,12 @@ class Symbolicator:
for image in self.images:
self.target = image.create_target ()
if self.target:
+ if self.target.GetAddressByteSize() == 4:
+ triple = self.target.triple
+ if triple:
+ arch = triple.split('-')[0]
+ if "arm" in arch:
+ self.addr_mask = 0xfffffffffffffffe
return self.target
return None
OpenPOWER on IntegriCloud