Examples of SourceMapping


Examples of avrora.core.SourceMapping

        }

        private void updateNodeID() {
            if ( UPDATE_NODE_ID.get() ) {
                Program p = path.getProgram();
                SourceMapping smap = p.getSourceMapping();
                SourceMapping.Location location = smap.getLocation("TOS_LOCAL_ADDRESS");
                if ( location == null ) location = smap.getLocation("node_address");
                if ( location != null ) {
                    BaseInterpreter bi = simulator.getInterpreter();
                    bi.writeFlashByte(location.address, Arithmetic.low(id));
                    bi.writeFlashByte(location.address+1, Arithmetic.high(id));
                }
View Full Code Here

Examples of avrora.core.SourceMapping

     * @return a list of program locations
     */
    public static List getLocationList(Program program, List v) {
        HashSet locset = new HashSet(v.size()*2);

        SourceMapping lm = program.getSourceMapping();
        Iterator i = v.iterator();

        while (i.hasNext()) {
            String val = (String)i.next();

            SourceMapping.Location l = lm.getLocation(val);
            if ( l == null )
                Avrora.userError("Label unknown", val);
            locset.add(l);
        }

View Full Code Here

Examples of avrora.core.SourceMapping

                addPair(loc.address, tar.address);
            }
        }

        private LabelMapping.Location getLocation(String src) {
            SourceMapping lm = program.getSourceMapping();
            SourceMapping.Location loc = lm.getLocation(src);
            if ( loc == null )
                Avrora.userError("Invalid program address: ", src);
            if ( program.readInstr(loc.address) == null )
                Avrora.userError("Invalid program address: ", src);
            return loc;
View Full Code Here

Examples of avrora.core.SourceMapping

            return loc;
        }

        private void addFrom() {
            Iterator i = FROM.get().iterator();
            SourceMapping sm = program.getSourceMapping();
            while (i.hasNext()) {
                String str = (String)i.next();
                SourceMapping.Location loc = sm.getLocation(str);
                for ( int cntr = 0; cntr < program.program_end; cntr = program.getNextPC(cntr) )
                    addPair(loc.address, cntr);
            }
        }
View Full Code Here

Examples of avrora.core.SourceMapping

            }
        }

        private void addTo() {
            Iterator i = TO.get().iterator();
            SourceMapping sm = program.getSourceMapping();
            while (i.hasNext()) {
                String str = (String)i.next();
                SourceMapping.Location loc = sm.getLocation(str);
                for ( int cntr = 0; cntr < program.program_end; cntr = program.getNextPC(cntr) )
                    addPair(cntr, loc.address);
            }
        }
View Full Code Here

Examples of avrora.core.SourceMapping

    }

    private void updateNodeID() {
      if ( UPDATE_NODE_ID.get() ) {
        Program p = path.getProgram();
        SourceMapping smap = p.getSourceMapping();
        SourceMapping.Location location = smap.getLocation("TOS_LOCAL_ADDRESS");
        if ( location == null ) location = smap.getLocation("node_address");
        if ( location != null ) {
          BaseInterpreter bi = simulator.getInterpreter();
          bi.writeFlashByte(location.address, Arithmetic.low(id));
          bi.writeFlashByte(location.address+1, Arithmetic.high(id));
        }
View Full Code Here

Examples of avrora.core.SourceMapping

                addPair(loc.address, tar.address);
            }
        }

        private LabelMapping.Location getLocation(String src) {
            SourceMapping lm = program.getSourceMapping();
            SourceMapping.Location loc = lm.getLocation(src);
            if ( loc == null )
                Avrora.userError("Invalid program address: ", src);
            if ( program.readInstr(loc.address) == null )
                Avrora.userError("Invalid program address: ", src);
            return loc;
View Full Code Here

Examples of com.google.collide.client.code.debugging.SourceMapping

    FileTreeModel fileTreeModel = new FileTreeModel(networkController);
    CanRunApplication runner = new CanRunApplication() {
      @Override
      public boolean runApplication(PathUtil applicationPath) {
        String baseUri = ResourceUriUtils.getAbsoluteResourceBaseUri();
        SourceMapping sourceMapping = StaticSourceMapping.create(baseUri);
        elemental.html.Window popup = DebuggingModelController.createOrOpenPopup(resources);
        if (popup != null) {
          String absoluteResourceUri = sourceMapping.getRemoteSourceUri(applicationPath);
          popup.getLocation().assign(absoluteResourceUri);
        }
        return false;
      }
    };
View Full Code Here

Examples of com.google.debugging.sourcemap.SourceMapping

      return lineNumber;
    }
    String contents;
    try {
      contents = Resources.toString(url, Charsets.UTF_8);
      SourceMapping mapping = SourceMapConsumerFactory.parse(contents);
      return mapping.getMappingForLine(lineNumber, 1).getLineNumber();
    }
    catch (IOException e) {
      throw new STJSRuntimeException(e);
    }
    catch (SourceMapParseException e) {
View Full Code Here

Examples of com.google.gwt.thirdparty.debugging.sourcemap.SourceMapping

  public static void main(String[] args) throws Exception {
    String filename = args[0];
    int line = Integer.valueOf(args[1]);
    int col = Integer.valueOf(args[2]);

    SourceMapping consumer = SourceMapConsumerFactory.parse(Util.readFileAsString(new File(filename)));
    System.out.println(consumer.getMappingForLine(line, col));
  }
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.