Package flash.swf.debug

Examples of flash.swf.debug.DebugModule


   */
  public void processLineRecord(ActionLocation where, LineRecord r)
  {
    int line = r.lineno;
    String func = (where.function == null) ? null : where.function.name;
    DebugModule dm = r.module;

    // locate the source file
    int id = -1;
    DModule module;

View Full Code Here


        }
  }

    public void printLines(LineRecord lr, PrintWriter out)
    {
        DebugModule script = lr.module;

        if (script != null)
        {
            int lineno = lr.lineno;
            if (lineno > 0)
View Full Code Here

  private String[] pool;

  public DebugModule getDebugModule(int offset)
  {
    DebugModule d = (DebugModule) modules.get(offset);
    if (d == null)
    {
      return null;
    }
    else
View Full Code Here

      String __Packages = idRef(tag.sprite);
      className = (__Packages != null && __Packages.startsWith("__Packages")) ? __Packages.substring(11) : null; // length("__Packages.") = 11

      if (isRegisterClass(tag.actionList))
      {
        DebugModule dm = new DebugModule();
        // C: We actually want the class name here, not the linkage ID.
        dm.name = "<" + __Packages + ".2>";
        // C: We want the class name as the second input argument. Fortunately, we don't
        //    really do anything with the source, so it's okay.
        dm.setText("Object.registerClass(" + __Packages + ", " + __Packages + ");");
        dm.bitmap = 1;

        LineRecord lr = new LineRecord(1, dm);

        int startOffset = tag.actionList.getOffset(0);
        dm.addOffset(lr, startOffset);

        tag.actionList.insert(startOffset, lr);
        modules.put((int) (Math.random() * Integer.MAX_VALUE), dm);
      }
    }
View Full Code Here

    for (int i=0; i < c.size(); i++)
    {
      Action a = c.getAction(i);

      DebugModule temp = null;

      switch (a.code)
      {
      case ActionConstants.sactionDefineFunction:
      case ActionConstants.sactionDefineFunction2:
View Full Code Here

    }

    // interprets the actions. try to assign names to anonymous functions...
    evalActions(c);

    DebugModule d = findDebugModule(c);

    String emptyMethodName = null;

    // loop again, this time, we register all the actions...
    for (int i=0; i < c.size(); i++)
View Full Code Here

    {
      int tag = (int) in.readUI32();
      switch (tag)
      {
      case kDebugScript:
        DebugModule m = new DebugModule();
        int id = (int) in.readUI32();
        m.id = id;
        m.bitmap = (int) in.readUI32();
        m.name = in.readString();
        m.setText(in.readString());

        adjustModuleName(m);

        if (modules.contains(id))
        {
          DebugModule m2 = (DebugModule) modules.get(id);
          if (!m.equals(m2))
          {
            handler.error("Module '" + m2.name + "' has the same ID as Module '" + m.name + "'");
            handler.error("Let's check for kDebugOffset that came before Module '" + m2.name + "'");
            handler.error("Before: Number of accumulated line records: " + lineRecords.size());
            lineRecords = purgeLineRecords(lineRecords, id, handler);
            handler.error("After: Number of accumulated line records: " + lineRecords.size());
          }
        }
        modules.put(id, m);
        handler.module(m);
        break;
      case kDebugOffset:
        id = (int) in.readUI32();
        int lineno = (int) in.readUI32();
        DebugModule module = (DebugModule) modules.get(id);
        LineRecord lr = new LineRecord(lineno, module);
        int offset = (int) in.readUI32();

        if (module != null)
        {
          // not corrupted before we add the offset and offset add fails
          boolean wasCorrupt = module.corrupt;
          if (!module.addOffset(lr, offset) && !wasCorrupt)
            handler.error(module.name+":"+lineno+" does not exist for offset "+offset+", module marked for exclusion from debugging");
          handler.offset(offset, lr);
        }
        else
        {
View Full Code Here

     * @return
     */
  private ArrayList<Object> purgeLineRecords(ArrayList<Object> lineRecords, final int moduleId, DebugHandler handler)
  {
    ArrayList<Object> newLineRecords = new ArrayList<Object>();
        DebugModule module = (DebugModule) modules.get(moduleId);
    int i = 0, size = lineRecords.size();
    while (i < size)
    {
      Integer id = (Integer) lineRecords.get(i);
      LineRecord lr = (LineRecord) lineRecords.get(i + 1);
View Full Code Here

   */
  public void processLineRecord(ActionLocation where, LineRecord r)
  {
    int line = r.lineno;
    String func = (where.function == null) ? null : where.function.name;
    DebugModule dm = r.module;

    // locate the source file
    int id = -1;
    DModule module;

View Full Code Here

TOP

Related Classes of flash.swf.debug.DebugModule

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.