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); }
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(); }
public bool ContainsPointer(BlamPointer blamPointer) { return(DefaultMemoryBlock.Contains(blamPointer) || ActiveStructureMemoryAllocation.Contains(blamPointer)); }