Commits

Victor Stinner committed 16f3a48

ARM: set frame pointer

Comments (0)

Files changed (2)

ptrace/binding/cpu.py

 elif CPU_ARM:
     CPU_INSTR_POINTER = 'r15'
     CPU_STACK_POINTER = 'r14'
+    CPU_FRAME_POINTER = 'r11'
 elif CPU_X86_64:
     CPU_INSTR_POINTER = "rip"
     CPU_STACK_POINTER = "rsp"

ptrace/debugger/process.py

         if CPU_INSTR_POINTER:
             self.setreg(CPU_INSTR_POINTER, ip)
         else:
-            raise ProcessError(self, "Instruction pointer is not defined")
+            raise ProcessError(self, "Instruction pointer register is not defined")
 
     def getInstrPointer(self):
         if CPU_INSTR_POINTER:
             return self.getreg(CPU_INSTR_POINTER)
         else:
-            raise ProcessError(self, "Instruction pointer is not defined")
+            raise ProcessError(self, "Instruction pointer register is not defined")
 
     def getStackPointer(self):
         if CPU_STACK_POINTER:
             return self.getreg(CPU_STACK_POINTER)
         else:
-            raise ProcessError(self, "Instruction pointer is not defined")
+            raise ProcessError(self, "Stack pointer register is not defined")
 
     def getFramePointer(self):
         if CPU_FRAME_POINTER:
             return self.getreg(CPU_FRAME_POINTER)
         else:
-            raise ProcessError(self, "Instruction pointer is not defined")
+            raise ProcessError(self, "Stack pointer register is not defined")
 
     def _readBytes(self, address, size):
         offset = address % CPU_WORD_SIZE