Package com.sun.jdi

Examples of com.sun.jdi.AbsentInformationException


    initJdwpRequest();
    try {
      JdwpReplyPacket replyPacket = requestVM(
          JdwpCommandPacket.RT_SOURCE_DEBUG_EXTENSION, this);
      if (replyPacket.errorCode() == JdwpReplyPacket.ABSENT_INFORMATION) {
        throw new AbsentInformationException(
            JDIMessages.ReferenceTypeImpl_31);
      }
      defaultReplyErrorHandler(replyPacket.errorCode());
      DataInputStream replyData = replyPacket.dataInStream();
      fSmap = readString(JDIMessages.ReferenceTypeImpl_32, replyData);
    } catch (IOException e) {
      defaultIOExceptionHandler(e);
    } finally {
      handledJdwpRequest();
    }
    // TODO: remove the workaround when the J9SC20030415 bug is fixed (see
    // bug 96485 of the vendor bug system).
    // Workaround to a J9SC bug. It returns an empty string instead of a
    // ABSENT_INFORMATION
    // error if the source debug extension is not available.
    if ("".equals(fSmap)) { //$NON-NLS-1$
      throw new AbsentInformationException(
          JDIMessages.ReferenceTypeImpl_31);
    }
    // parse the source map.
    fStrata = new HashMap<String, Stratum>();
    SourceDebugExtensionParser.parse(fSmap, this);
View Full Code Here


    initJdwpRequest();
    try {
      JdwpReplyPacket replyPacket = requestVM(
          JdwpCommandPacket.RT_SOURCE_FILE, this);
      if (replyPacket.errorCode() == JdwpReplyPacket.ABSENT_INFORMATION) {
        throw new AbsentInformationException(
            JDIMessages.ReferenceTypeImpl_Source_name_is_not_known_7);
      }

      defaultReplyErrorHandler(replyPacket.errorCode());
View Full Code Here

        if (sourceName == null || (found = sourceName.equals(fileInfo.fFileName))) {
          javaLines.addAll(fileInfo.getOutputLinesForLine(lineNumber));
        }
      }
      if (sourceName != null && !found) {
        throw new AbsentInformationException(JDIMessages.ReferenceTypeImpl_34);
      }
    } else { // Java stratum
      javaLines.add(new Integer(lineNumber));
    }
    return method.javaStratumLocationsOfLines(javaLines);
View Full Code Here

          }
        }
      } else { // sourceName != null
        FileInfo fileInfo = stratum.getFileInfo(sourceName);
        if (fileInfo == null) {
          throw new AbsentInformationException(JDIMessages.ReferenceTypeImpl_34);
        }
        int fileId = fileInfo.fFileId;
        int lastIndex = 0;
        for (int i = 0, length = javaStratumLineNumberTable.length; i < length; i++) {
          List<int[]> lineInfos = stratum.getInputLineInfos(javaStratumLineNumberTable[i]);
View Full Code Here

      if (fPrimaryFileId == -1) {
        fPrimaryFileId = fileId;
      }
      FileInfo fileInfo = new FileInfo(fileId, fileName, absoluteFileName);
      if (fFileInfos.contains(fileInfo)) {
        throw new AbsentInformationException(NLS.bind(
            JDIMessages.ReferenceTypeImpl_28, new String[] {
                Integer.toString(fileId), fId }));
      }
      fFileInfos.add(fileInfo);
    }
View Full Code Here

        if (element.fFileId == lineFileId) {
          fileInfo = element;
        }
      }
      if (fileInfo == null) {
        throw new AbsentInformationException(NLS.bind(
            JDIMessages.ReferenceTypeImpl_29,
            new String[] { Integer.toString(lineFileId) }));
      }
      // add the data to the different hash maps.
      for (int i = 0; i < repeatCount; i++, inputStartLine++) {
View Full Code Here

  private void parseSmap(String smap) throws AbsentInformationException {
    Lexer lexer = new Lexer(smap);
    parseHeader(lexer);
    parseSections(lexer);
    if (!fDefinedStrata.contains(fReferenceType.defaultStratum())) {
      throw new AbsentInformationException(
          JDIMessages.SourceDebugExtensionParser_2);
    }
  }
View Full Code Here

   * @param lexer
   */
  private void parseHeader(Lexer lexer) throws AbsentInformationException {
    int lexemType = lexer.nextLexem();
    if (lexemType != Lexer.SMAP) {
      throw new AbsentInformationException(
          JDIMessages.SourceDebugExtensionParser_3);
    }
    if (lexer.nextLexem() != Lexer.CR) {
      throw new AbsentInformationException(
          JDIMessages.SourceDebugExtensionParser_4);
    }
    if (isAsteriskLexem(lexer.nextLexem())) {
      throw new AbsentInformationException(
          JDIMessages.SourceDebugExtensionParser_5);
    }
    fReferenceType.setOutputFileName(getNonAsteriskString(lexer));
    if (isAsteriskLexem(lexer.lexemType())) {
      throw new AbsentInformationException(
          JDIMessages.SourceDebugExtensionParser_6);
    }
    fReferenceType.setDefaultStratumId(getNonAsteriskString(lexer));
  }
View Full Code Here

   * @param lexer
   */
  private void parseStratumSection(Lexer lexer)
      throws AbsentInformationException {
    if (lexer.lexemType() != Lexer.ASTERISK_S) {
      throw new AbsentInformationException(
          JDIMessages.SourceDebugExtensionParser_7);
    }
    if (isAsteriskLexem(lexer.nextLexem())) {
      throw new AbsentInformationException(
          JDIMessages.SourceDebugExtensionParser_8);
    }
    String stratumId = getNonAsteriskString(lexer);
    if (fDefinedStrata.contains(stratumId)) {
      throw new AbsentInformationException(NLS.bind(
          JDIMessages.SourceDebugExtensionParser_9,
          new String[] { stratumId }));
    }
    fCurrentStratum = new ReferenceTypeImpl.Stratum(stratumId);
    fFileSectionDefinedForCurrentStratum = false;
    fLineSectionDefinedForCurrentStratum = false;
    int lexemType = lexer.lexemType();
    while (lexemType != Lexer.ASTERISK_E && lexemType != Lexer.ASTERISK_S) {
      switch (lexemType) {
      case Lexer.ASTERISK_F:
        if (fFileSectionDefinedForCurrentStratum) {
          throw new AbsentInformationException(NLS.bind(
              JDIMessages.SourceDebugExtensionParser_10,
              new String[] { stratumId }));
        }
        parseFileSection(lexer);
        fFileSectionDefinedForCurrentStratum = true;
        break;
      case Lexer.ASTERISK_L:
        if (fLineSectionDefinedForCurrentStratum) {
          throw new AbsentInformationException(NLS.bind(
              JDIMessages.SourceDebugExtensionParser_11,
              new String[] { stratumId }));
        }
        parseLineSection(lexer);
        fLineSectionDefinedForCurrentStratum = true;
        break;
      case Lexer.ASTERISK_V:
        parseVendorSection(lexer);
        break;
      case Lexer.ASTERISK_CHAR:
        parseFutureSection(lexer);
        break;
      default:
        throw new AbsentInformationException(NLS.bind(
            JDIMessages.SourceDebugExtensionParser_12,
            new String[] { new String(lexer.lexem()) }));
      }
      lexemType = lexer.lexemType();
    }
    if (!fFileSectionDefinedForCurrentStratum) {
      throw new AbsentInformationException(NLS.bind(
          JDIMessages.SourceDebugExtensionParser_13,
          new String[] { stratumId }));
    }
    if (!fLineSectionDefinedForCurrentStratum) {
      throw new AbsentInformationException(NLS.bind(
          JDIMessages.SourceDebugExtensionParser_14,
          new String[] { stratumId }));
    }
    fDefinedStrata.add(stratumId);
    fReferenceType.addStratum(fCurrentStratum);
View Full Code Here

   * @param lexer
   */
  private void parseFileSection(Lexer lexer)
      throws AbsentInformationException {
    if (lexer.nextLexem() != Lexer.CR) {
      throw new AbsentInformationException(NLS.bind(
          JDIMessages.SourceDebugExtensionParser_12,
          new String[] { new String(lexer.lexem()) }));
    }
    lexer.nextLexem();
    while (!isAsteriskLexem(lexer.lexemType())) {
View Full Code Here

TOP

Related Classes of com.sun.jdi.AbsentInformationException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.