Пример #1
0
 // Provide info about stack and heap areas
 private uint HeapInfo()
 {
     // Parameter: r1 is a pointer to a 4 word block of memory to receive the results
     try
     {
         uint addr = mIhost.getReg(1);
         mIhost.SetMemory(addr, ARMPluginInterfaces.MemorySize.Word, mIhost.GetMemoryParameter("HeapStart"));
         mIhost.SetMemory(addr + 4, ARMPluginInterfaces.MemorySize.Word, mIhost.GetMemoryParameter("HeapEnd"));
         mIhost.SetMemory(addr + 8, ARMPluginInterfaces.MemorySize.Word, mIhost.GetMemoryParameter("StackStart"));
         mIhost.SetMemory(addr + 12, ARMPluginInterfaces.MemorySize.Word, mIhost.GetMemoryParameter("StackEnd"));
     }
     catch (MemoryAccessException)
     {
         return(errorCode(Errno.EFAULT));
     }
     return(0);
 }