<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
This commit is contained in:
Greg Clayton
2013-04-04 23:36:51 +00:00
parent 9812634c52
commit a16cb16a58
2 changed files with 10 additions and 3 deletions

View File

@@ -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