]> git.saurik.com Git - apple/xnu.git/blobdiff - tools/lldbmacros/xnutriage.py
xnu-7195.101.1.tar.gz
[apple/xnu.git] / tools / lldbmacros / xnutriage.py
old mode 100644 (file)
new mode 100755 (executable)
index ae4050f..fbe1bb0
@@ -56,7 +56,7 @@ def NewBt(cmd_args=None):
         return False
     a = ArgumentStringToInt(cmd_args[0])
     while a != 0:
-        if kern.arch == "x86_64" or kern.arch == "arm64":
+        if kern.arch == "x86_64" or kern.arch.startswith("arm64"):
             offset = 8
         else:
             offset = 4
@@ -66,7 +66,10 @@ def NewBt(cmd_args=None):
         if len(cmd_out) != 0:
             cmd_out1 = cmd_out.split('\n')
             if len(cmd_out1) != 0:
-                print OutputAddress([unsigned(link_register)]) + ": " + cmd_out1[0].split(':')[1]
+                address = OutputAddress([unsigned(link_register)])
+                if address is None:
+                    address = '0x%x <???>' % unsigned(link_register)
+                print address + ": " + cmd_out1[1].split(':', 1)[1]
         a = dereference(kern.GetValueFromAddress(unsigned(a), 'uintptr_t *'))
 
 # EndMacro: newbt