offsetOf method
The PCOffset for the given absolute program counter address.
Implementation
PCOffset? offsetOf(int address) {
if (_isolateStart == null || _vmStart == null) return null;
final isolateOffset = address - _isolateStart!;
var vmOffset = address - _vmStart!;
if (vmOffset > 0 && vmOffset == min(vmOffset, isolateOffset)) {
return PCOffset(vmOffset, InstructionsSection.vm,
os: _os,
architecture: _arch,
compressedPointers: _compressed,
usingSimulator: _simulated);
} else {
return PCOffset(isolateOffset, InstructionsSection.isolate,
os: _os,
architecture: _arch,
compressedPointers: _compressed,
usingSimulator: _simulated);
}
}