Examples of DebugInfo


Examples of org.apache.ode.bpel.o.DebugInfo

   
    private DebugInfo createDebugInfo(BpelObject bpelObject, String description) {
        int lineNo = bpelObject == null ? -1 : bpelObject.getLineNo();
        String str = description == null && bpelObject != null ? bpelObject.toString() : null;
        Map<QName, Object> extElmt = bpelObject == null ? null : bpelObject.getExtensibilityElements();
        DebugInfo debugInfo = new DebugInfo(_processDef.getSource(), lineNo, extElmt);
        debugInfo.description = str;
        return debugInfo;
    }
View Full Code Here

Examples of org.apache.ode.bpel.o.DebugInfo

            ocopy.keepSrcElementName = scopy.isKeepSrcElement();
            ocopy.ignoreMissingFromData = scopy.isIgnoreMissingFromData();
            ocopy.ignoreUninitializedFromVariable = scopy.isIgnoreUninitializedFromVariable();
            ocopy.insertMissingToData = scopy.isInsertMissingToData();
            ocopy.insertMissingToData = scopy.isInsertMissingToData();
            ocopy.debugInfo = new DebugInfo(_context.getSourceLocation(), scopy.getLineNo(),
                    source.getExtensibilityElements());
            try {
                if (scopy.getFrom() == null)
                    throw new CompilationException(__cmsgs.errMissingFromSpec().setSource(scopy));
                ocopy.from = compileFrom(scopy.getFrom());
View Full Code Here

Examples of org.apache.ode.bpel.rtrep.v1.DebugInfo

    private DebugInfo createDebugInfo(BpelObject bpelObject, String description) {
        int lineNo = bpelObject == null ? -1 : bpelObject.getLineNo();
        String str = description == null && bpelObject != null ? bpelObject.toString() : null;
        Map<QName, Object> extElmt = bpelObject == null ? null : bpelObject.getExtensibilityElements();
        DebugInfo debugInfo = new DebugInfo(_processDef.getSource(), lineNo, extElmt);
        debugInfo.description = str;
        return debugInfo;
    }
View Full Code Here

Examples of org.apache.ode.bpel.rtrep.v2.DebugInfo

    private DebugInfo createDebugInfo(BpelObject bpelObject, String description) {
        int lineNo = bpelObject == null ? -1 : bpelObject.getLineNo();
        String str = description == null && bpelObject != null ? bpelObject.toString() : null;
        Map<QName, Object> extElmt = bpelObject == null ? null : bpelObject.getExtensibilityElements();
        DebugInfo debugInfo = new DebugInfo(_processDef.getSource(), lineNo, extElmt);
        debugInfo.description = str;
        return debugInfo;
    }
View Full Code Here

Examples of org.apache.ode.bpel.rtrep.v2.DebugInfo

            OAssign.Copy ocopy = new OAssign.Copy(_context.getOProcess());
                ocopy.keepSrcElementName = scopy.isKeepSrcElement();
                ocopy.ignoreMissingFromData = scopy.isIgnoreMissingFromData();
                ocopy.insertMissingToData = scopy.isInsertMissingToData();
                ocopy.ignoreUninitializedFromVariable = scopy.isIgnoreUninitializedFromVariable();
                ocopy.debugInfo = new DebugInfo(_context.getSourceLocation(), scopy.getLineNo(),
                        source.getExtensibilityElements());
                try {
                    if (scopy.getFrom() == null)
                        throw new CompilationException(__cmsgs.errMissingFromSpec().setSource(scopy));
                    ocopy.from = compileFrom(scopy.getFrom());
                    if (scopy.getTo() == null)
                        throw new CompilationException(__cmsgs.errMissingToSpec().setSource(scopy));
                    ocopy.to = compileTo(scopy.getTo());

                    verifyCopy(ocopy);
                    oassign.operations.add(ocopy);

                } catch (CompilationException ce) {
                    _context.recoveredFromError(scopy, ce);
                }
          } else if (operation instanceof ExtensionAssignOperation) {
            ExtensionAssignOperation sop = (ExtensionAssignOperation)operation;
            OAssign.ExtensionAssignOperation oext = new OAssign.ExtensionAssignOperation(_context.getOProcess());
            oext.debugInfo = new DebugInfo(_context.getSourceLocation(), sop.getLineNo(), source.getExtensibilityElements());
            try {
              if (source.is20Draft()) {
                throw new CompilationException(__cmsgs.errExtensibleAssignNotSupported());
              }
              Element el = sop.getNestedElement();
View Full Code Here

Examples of se.sics.mspsim.util.DebugInfo

  private static String getMoteString(Mote mote) {
    if (!(mote instanceof MspMote)) {
      return null;
    }
    try {
      DebugInfo debugInfo =
        ((MspMoteType)mote.getType()).getELF().getDebugInfo(((MspMote)mote).getCPU().reg[MSP430.PC]);
      if (debugInfo == null) {
        return null;
      }
      return debugInfo.getFile() + ":" + debugInfo.getLine();
    } catch (Exception e) {
      return "?";
    }
  }
View Full Code Here

Examples of se.sics.mspsim.util.DebugInfo

  private void updateCurrentSourceCodeFile() {
    currentCodeFile = null;

    try {
      int pc = mspMote.getCPU().getPC();
      DebugInfo debugInfo = debug.getDebugInfo(pc);
      if (pc <= 0) {
        return;
      }
      if (debugInfo == null) {
        logger.warn("No source info at " + String.format("0x%04x", pc));
        return;
      }
      File f = applySubstitutionRules(new File(debugInfo.getPath(), debugInfo.getFile()), rules);
      if (f == null || !f.exists()) {
        logger.warn("Unknown source at " + String.format("0x%04x", pc) + ": " + debugInfo.getPath() + " " + debugInfo.getFile());
        return;
      }

      currentCodeFile = f;
      currentLineNumber = debugInfo.getLine();
    } catch (Exception e) {
      logger.fatal("Exception: " + e.getMessage(), e);
      currentCodeFile = null;
      currentLineNumber = -1;
    }
View Full Code Here

Examples of se.sics.mspsim.util.DebugInfo

      // No debug information is available
      return fileToLineHash;
    }

    for (int address: addresses) {
      DebugInfo info = elf.getDebugInfo(address);
      if (info == null) {
        continue;
      }
      if (info.getPath() == null && info.getFile() == null) {
        continue;
      }
      if (info.getLine() < 0) {
        continue;
      }

      File file;
      if (info.getPath() != null) {
        file = new File(info.getPath(), info.getFile());
      } else {
        file = new File(info.getFile());
      }
      try {
        file = file.getCanonicalFile();
      } catch (IOException e) {
      } catch (java.security.AccessControlException e) {
      }

      Hashtable<Integer, Integer> lineToAddrHash = fileToLineHash.get(file);
      if (lineToAddrHash == null) {
        lineToAddrHash = new Hashtable<Integer, Integer>();
        fileToLineHash.put(file, lineToAddrHash);
      }

      lineToAddrHash.put(info.getLine(), address);
    }

    return fileToLineHash;
  }
View Full Code Here

Examples of se.sics.mspsim.util.DebugInfo

  }

  public String getPCString() {
    int pc = myCpu.getPC();
    ELF elf = myCpu.getRegistry().getComponent(ELF.class);
    DebugInfo di = elf.getDebugInfo(pc);

    /* Following code examples from MSPsim, DebugCommands.java */
    if (di == null) {
      di = elf.getDebugInfo(pc + 1);
    }
    if (di == null) {
      /* Return PC value */
      SimpleProfiler sp = (SimpleProfiler)myCpu.getProfiler();
      try {
        MapEntry mapEntry = sp.getCallMapEntry(0);
        if (mapEntry != null) {
          String file = mapEntry.getFile();
          if (file != null) {
            if (file.indexOf('/') >= 0) {
              file = file.substring(file.lastIndexOf('/')+1);
            }
          }
          String name = mapEntry.getName();
          return file + ":?:" + name;
        }
        return String.format("*%02x", pc);
      } catch (Exception e) {
        return null;
      }
    }

    int lineNo = di.getLine();
    String file = di.getFile();
    file = file==null?"?":file;
    if (file.contains("/")) {
      /* strip path */
      file = file.substring(file.lastIndexOf('/')+1, file.length());
    }

    String function = di.getFunction();
    function = function==null?"":function;
    if (function.contains(":")) {
      /* strip arguments */
      function = function.substring(0, function.lastIndexOf(':'));
    }
View Full Code Here

Examples of se.sics.mspsim.util.DebugInfo

        if (DEBUG) {
    System.out.println("File: " + currentPath + " " + currentFile);
    System.out.println("Function: " + currentFunction);
    System.out.println("Line No: " + currentLine);
        }
        return new DebugInfo(currentLine, currentPath, currentFile,
           currentFunction);
      }
    }
  }
  break;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.