protected void read(SignalInputStream in) throws IOException {
    int registersCount; // U32

    pid = in.readS32();
    status = in.readS32();
    registersCount = in.readS32();
    registers = in.readS32Array(registersCount);
  }
 private String skipAndReadFileName(boolean hasFileName, int skipBytes, SignalInputStream in)
     throws IOException {
   if (hasFileName) {
     in.skipBytes(skipBytes);
     return in.readString();
   }
   return "";
 }
  protected void read(SignalInputStream in) throws IOException {
    int fileNameOffset; // U32

    super.read(in);
    from = in.readS32();
    exec = in.readBoolean();
    error = in.readS32();
    extra = in.readS32();
    lineNumber = in.readS32();
    fileNameOffset = in.readS32();
    euId = in.readS16();
    in.readS16(); // Unused U16 reserved0
    reserved1 = in.readS32(); // offset to where Extended Info starts
    int before = in.getReadPosition();
    if (reserved1 < fileNameOffset) {
      // read ExtendedErrorInfo first
      monitorExtendedErrorInfo = skipAndReadExtended(reserved1 > 0, reserved1, in);
      int skipBytes = getBytesToSkip(before, fileNameOffset, in);
      fileName = skipAndReadFileName(lineNumber > 0, skipBytes, in);
    } else if (fileNameOffset <= reserved1) {
      // read Filename first
      fileName = skipAndReadFileName(lineNumber > 0, fileNameOffset, in);
      int skipbytes = getBytesToSkip(before, reserved1, in);
      monitorExtendedErrorInfo = skipAndReadExtended(reserved1 > 0, skipbytes, in);
    }
  }
 private MonitorExtendedErrorInfo skipAndReadExtended(
     boolean hasExtended, int skipBytes, SignalInputStream in) throws IOException {
   if (hasExtended) {
     in.skipBytes(skipBytes);
     MonitorExtendedErrorInfo extended = new MonitorExtendedErrorInfo();
     extended.read(in);
     return extended;
   }
   return null;
 }
 protected void read(SignalInputStream in) throws IOException {
   snapshotId = in.readS32();
   pid = in.readS32();
   core = in.readS32();
   timeStamp = in.readS64();
   errorCode = in.readS32();
   eCodeExtra = in.readS32();
   sigLeft = in.readS32();
   eCodeExtraHi = in.readS32();
   in.readS16(); // Unused U16 reserved0
   in.readS16(); // Unused U16 reserved1
   tracepointId = in.readS32();
   dataLength = in.readS32();
   traceData = in.readS8Array(dataLength);
 }
 private int getBytesToSkip(int before, int offset, SignalInputStream in) {
   int current = in.getReadPosition();
   int readLength = current - before;
   return offset - readLength;
 }