Example #1
0
 def patchFunctionReturnAddress(self, pygdb, ptid, addr):
     pid = _pid = pygdb.getPidFromTid(ptid)
     sp = pygdb.getRegisterIndex(self.INDEX_SP, ptid)
     retAddr = self.getFunctionReturnAddress(pygdb, ptid, pid)
     pygdb.writeMemory(sp, tools.intToByteStr(addr, self.WORD_SIZE * 8, tools.ENDIANESS.LITTLE), pid=pid)
     return retAddr