]> git.saurik.com Git - apple/xnu.git/blobdiff - tools/lldbmacros/usertaskdebugging/userprocess.py
xnu-6153.61.1.tar.gz
[apple/xnu.git] / tools / lldbmacros / usertaskdebugging / userprocess.py
index 74e54223e0d49b65278c01464ebfc4730bd16501..a4a9a61b2b441d32c8ec6f9c9ccdcb574ad9d6c6 100755 (executable)
@@ -10,10 +10,13 @@ CPU_TYPE_I386 = 0x00000007
 CPU_TYPE_X86_64 = 0x01000007
 CPU_TYPE_ARM = 0x0000000c
 CPU_TYPE_ARM64 = 0x0100000c
+CPU_TYPE_ARM64_32 = 0x0200000c
 
 def GetRegisterSetForCPU(cputype, subtype):
     if cputype == CPU_TYPE_ARM64:
         retval = Armv8_RegisterSet
+    elif cputype == CPU_TYPE_ARM64_32:
+        retval = Armv8_RegisterSet
     elif cputype == CPU_TYPE_ARM:
         retval = Armv7_RegisterSet
     elif cputype == CPU_TYPE_I386:
@@ -52,6 +55,9 @@ class UserThreadObject(object):
                     self.saved_state = self.thread.machine.PcbData
                 else:
                     self.saved_state = self.thread.machine.contextData.ss.uss.ss_32
+            if cputype == CPU_TYPE_ARM64_32:
+                self.reg_type = "arm64"
+                self.saved_state = self.thread.machine.upcb.uss.ss_64
 
         logging.debug("created thread id 0x%x of type %s, is_kern_64bit 0x%x cputype 0x%x"
                       % (self.thread_id, self.reg_type, is_kern_64bit, cputype))
@@ -101,8 +107,7 @@ class UserProcess(target.Process):
         if task.t_flags & 0x2:
             dataregisters64bit = True
 
-        is_kern_64bit = kern.arch in ['x86_64', 'x86_64h', 'arm64'
-        ]
+        is_kern_64bit = kern.arch in ['x86_64', 'x86_64h', 'arm64', 'arm64e']
 
         self.cputype = unsigned(self.proc.p_cputype)
         self.cpusubtype = unsigned(self.proc.p_cpusubtype)