Exemple #1
0
 private bool TryConvertOffsetToPointer(ref int value)
 {
     if (DefaultMemoryBlock.ContainsFileOffset(value))
     {
         value = DefaultMemoryBlock.GetOffset(value, false, true);
         return(true);
     }
     if (ActiveStructureMemoryAllocation.ContainsFileOffset(value))
     {
         value = ActiveStructureMemoryAllocation.GetOffset(value, false, true);
         return(true);
     }
     return(false);
 }
Exemple #2
0
 public int VirtualAddressToFileOffset(int value)
 {
     if (DefaultMemoryBlock.ContainsVirtualOffset(value))
     {
         return(DefaultMemoryBlock.GetOffset(value));
     }
     if (ActiveStructureMemoryAllocation.ContainsVirtualOffset(value))
     {
         return(ActiveStructureMemoryAllocation.GetOffset(value));
     }
     foreach (var block in StructureMemoryBlocks.Where(block => block.ContainsVirtualOffset(value)))
     {
         return(block.GetOffset(value));
     }
     throw new InvalidOperationException();
 }
Exemple #3
0
 public bool ContainsPointer(BlamPointer blamPointer)
 {
     return(DefaultMemoryBlock.Contains(blamPointer) || ActiveStructureMemoryAllocation.Contains(blamPointer));
 }