public static uint GetProcessAddress(this WatchVariable watchVar, ProcessStream stream, uint offset = 0) { uint address = GetRamAddress(watchVar, stream, offset, false); return((uint)LittleEndianessAddressing.AddressFix( (int)(address + stream.ProcessMemoryOffset), watchVar.GetByteCount())); }
public static uint GetRamAddress(this WatchVariable watchVar, ProcessStream stream, uint offset = 0, bool addressArea = true) { uint offsetedAddress = offset + watchVar.Address; uint address; if (watchVar.AbsoluteAddressing) { address = LittleEndianessAddressing.AddressFix((uint)(offsetedAddress - stream.ProcessMemoryOffset), watchVar.GetByteCount()); } else { address = offsetedAddress; } return(addressArea ? address | 0x80000000 : address& 0x0FFFFFFF); }