156 |
if (end > uint.MaxValue) |
if (end > uint.MaxValue) |
157 |
logger.Warn.WriteLine("Warning: DumpRam(): ending address is greater than 0x{0:x8} and we are running x64, this will exceed the max value for UIntPtr", int.MaxValue); |
logger.Warn.WriteLine("Warning: DumpRam(): ending address is greater than 0x{0:x8} and we are running x64, this will exceed the max value for UIntPtr", int.MaxValue); |
158 |
} |
} |
159 |
|
else if (arch == ProcessorAssemblyArchitecture.AnyCpu) |
160 |
|
{ |
161 |
|
if (IntPtr.Size == 4) //x86 |
162 |
|
{ |
163 |
|
if (end > int.MaxValue) |
164 |
|
logger.Warn.WriteLine("Warning: DumpRam(): ending address is greater than 0x{0:x8} and we are running x86, this will exceed the max value for IntPtr", int.MaxValue); |
165 |
|
} |
166 |
|
else if (IntPtr.Size == 8) //x64 |
167 |
|
{ |
168 |
|
} |
169 |
|
else // unknown |
170 |
|
{ |
171 |
|
if (end > uint.MaxValue) |
172 |
|
logger.Warn.WriteLine("Warning: DumpRam(): ending address is greater than 0x{0:x8} and we are running x64, this will exceed the max value for UIntPtr", int.MaxValue); |
173 |
|
} |
174 |
|
} |
175 |
else |
else |
176 |
{ |
{ |
177 |
throw new InvalidProgramException(string.Format("Unexcepted processor aritecture: expected x86 or x64 but we have: {0}", arch)); |
throw new InvalidProgramException(string.Format("Unexcepted processor aritecture: expected x86, x64, or AnyCpu(Msil) but we have: {0}", arch)); |
178 |
} |
} |
179 |
DumpRam(start, byte_count, filename); |
DumpRam(start, byte_count, filename); |
180 |
} |
} |