sa-jdi

ndProcessor this$0;
  
  CommandProcessor$19(CommandProcessor paramCommandProcessor, String x0, boolean x1)
  {
    super(paramCommandProcessor, x0, x1);
  }
  
  public void doit(CommandProcessor.Tokens t)
  {
    if (t.countTokens() != 0)
    {
      usage();
    }
    else
    {
      CommandProcessor.access$300(this$0).detach();
      System.exit(0);
    }
  }
}

/* Location:
 * Qualified Name:     sun.jvm.hotspot.CommandProcessor.19
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package sun.jvm.hotspot;

final class CommandProcessor$2
  extends CommandProcessor.Command
{
  private final CommandProcessor this$0;
  
  CommandProcessor$2(CommandProcessor paramCommandProcessor, String x0, String x1, boolean x2)
  {
    super(paramCommandProcessor, x0, x1, x2);
  }
  
  public void doit(CommandProcessor.Tokens t)
  {
    int tokens = t.countTokens();
    if (tokens == 1)
    {
      CommandProcessor.access$200(this$0);
      CommandProcessor.access$300(this$0).attach(t.nextToken());
      CommandProcessor.access$400(this$0);
    }
    else if (tokens == 2)
    {
      CommandProcessor.access$200(this$0);
      CommandProcessor.access$300(this$0).attach(t.nextToken(), t.nextToken());
      CommandProcessor.access$400(this$0);
    }
    else
    {
      usage();
    }
  }
}

/* Location:
 * Qualified Name:     sun.jvm.hotspot.CommandProcessor.2
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package sun.jvm.hotspot;

import java.io.PrintStream;

final class CommandProcessor$20
  extends CommandProcessor.Command
{
  private final CommandProcessor this$0;
  
  CommandProcessor$20(CommandProcessor paramCommandProcessor, String x0, String x1, boolean x2)
  {
    super(paramCommandProcessor, x0, x1, x2);
  }
  
  public void doit(CommandProcessor.Tokens t)
  {
    if (t.countTokens() == 0) {
      CommandProcessor.access$000(this$0).println("echo is " + CommandProcessor.access$1000(this$0));
    } else if (t.countTokens() == 1) {
      CommandProcessor.access$1002(this$0, Boolean.valueOf(t.nextToken()).booleanValue());
    } else {
      usage();
    }
  }
}

/* Location:
 * Qualified Name:     sun.jvm.hotspot.CommandProcessor.20
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package sun.jvm.hotspot;

import java.io.PrintStream;

final class CommandProcessor$21
  extends CommandProcessor.Command
{
  private final CommandProcessor this$0;
  
  CommandProcessor$21(CommandProcessor paramCommandProcessor, String x0, String x1, boolean x2)
  {
    super(paramCommandProcessor, x0, x1, x2);
  }
  
  public void doit(CommandProcessor.Tokens t)
  {
    if (t.countTokens() == 0) {
      CommandProcessor.access$000(this$0).println("versioncheck is " + (System.getProperty("sun.jvm.hotspot.runtime.VM.disableVersionCheck") == null));
    } else if (t.countTokens() == 1)
    {
      if (Boolean.valueOf(t.nextToken()).booleanValue()) {
        System.setProperty("sun.jvm.hotspot.runtime.VM.disableVersionCheck", null);
      } else {
        System.setProperty("sun.jvm.hotspot.runtime.VM.disableVersionCheck", "true");
      }
    }
    else {
      usage();
    }
  }
}

/* Location:
 * Qualified Name:     sun.jvm.hotspot.CommandProcessor.21
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package sun.jvm.hotspot;

import java.io.PrintStream;
import sun.jvm.hotspot.debugger.Address;
import sun.jvm.hotspot.debugger.JVMDebugger;
import sun.jvm.hotspot.debugger.OopHandle;
import sun.jvm.hotspot.oops.Klass;
import sun.jvm.hotspot.oops.ObjectHeap;
import sun.jvm.hotspot.oops.Oop;
import sun.jvm.hotspot.oops.Symbol;
import sun.jvm.hotspot.oops.UnknownOopException;
import sun.jvm.hotspot.runtime.VM;
import sun.jvm.hotspot.utilities.RobustOopDeterminator;
import sun.jvm.hotspot.utilities.SystemDictionaryHelper;

final class CommandProcessor$22
  extends CommandProcessor.Command
{
  private final CommandProcessor this$0;
  
  CommandProcessor$22(CommandProcessor paramCommandProcessor, String x0, String x1, boolean x2)
  {
    super(paramCommandProcessor, x0, x1, x2);
  }
  
  public void doit(CommandProcessor.Tokens t)
  {
    if ((t.countTokens() != 2) && (t.countTokens() != 3))
    {
      usage();
    }
    else
    {
      long stride = VM.getVM().getAddressSize();
      Address base = VM.getVM().getDebugger().parseAddress(t.nextToken());
      Address end = VM.getVM().getDebugger().parseAddress(t.nextToken());
      Klass klass = null;
      if (t.countTokens() == 1) {
        klass = SystemDictionaryHelper.findInstanceKlass(t.nextToken());
      }
      while ((base != null) && (base.lessThan(end)))
      {
        long step = stride;
        OopHandle handle = base.addOffsetToAsOopHandle(0L);
        if (RobustOopDeterminator.oopLooksValid(handle)) {
          try
          {
            Oop oop = VM.getVM().getObjectHeap().newOop(handle);
            if ((klass == null) || (oop.getKlass().isSubtypeOf(klass))) {
              CommandProcessor.access$000(this$0).println(handle.toString() + " " + oop.getKlass().getName().asString());
            }
            step = oop.getObjectSize();
          }
          catch (UnknownOopException ex) {}catch (RuntimeException ex)
          {
            ex.printStackTrace();
          }
        }
        base = base.addOffsetTo(step);
      }
    }
  }
}

/* Location:
 * Qualified Name:     sun.jvm.hotspot.CommandProcessor.22
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package sun.jvm.hotspot;

import java.util.Iterator;
import sun.jvm.hotspot.debugger.Address;
import sun.jvm.hotspot.types.Field;
import sun.jvm.hotspot.types.Type;
import sun.jvm.hotspot.types.TypeDataBase;
import sun.jvm.hotspot.types.basic.BasicType;

final class CommandProcessor$23
  extends CommandProcessor.Command
{
  private final CommandProcessor this$0;
  
  CommandProcessor$23(CommandProcessor paramCommandProcessor, String x0, String x1, boolean x2)
  {
    super(paramCommandProcessor, x0, x1, x2);
  }
  
  public void doit(CommandProcessor.Tokens t)
  {
    if ((t.countTokens() != 1) && (t.countTokens() != 0) && (t.countTokens() != 6))
    {
      usage();
      return;
    }
    if (t.countTokens() == 1)
    {
      Type type = CommandProcessor.access$900(this$0).getTypeDataBase().lookupType(t.nextToken());
      this$0.dumpFields(type);
    }
    else if (t.countTokens() == 0)
    {
      Iterator i = CommandProcessor.access$900(this$0).getTypeDataBase().getTypes();
      while (i.hasNext()) {
        this$0.dumpFields((Type)i.next());
      }
    }
    else
    {
      BasicType containingType = (BasicType)CommandProcessor.access$900(this$0).getTypeDataBase().lookupType(t.nextToken());
      
      String fieldName = t.nextToken();
      
      Type fieldType = CommandProcessor.access$900(this$0).getTypeDataBase().lookupType(t.nextToken());
      
      boolean isStatic = Boolean.valueOf(t.nextToken()).booleanValue();
      long offset = Long.parseLong(t.nextToken());
      Address staticAddress = this$0.parseAddress(t.nextToken());
      if ((isStatic) && (staticAddress == null)) {
        staticAddress = this$0.lookup(containingType.getName() + "::" + fieldName);
      }
      Iterator i = containingType.getFields();
      while (i.hasNext())
      {
        Field f = (Field)i.next();
        if (f.getName().equals(fieldName))
        {
          if (f.isStatic() != isStatic) {
            throw new RuntimeException("static/nonstatic mismatch: " + input);
          }
          if (!isStatic)
          {
            if (f.getOffset() != offset) {
              throw new RuntimeException("bad redefinition of field offset: " + input);
            }
          }
          else if (!f.getStaticFieldAddress().equals(staticAddress)) {
            throw new RuntimeException("bad redefinition of field location: " + input);
          }
          if (f.getType() != fieldType) {
            throw new RuntimeException("bad redefinition of field type: " + input);
          }
          return;
        }
      }
      HotSpotTypeDataBase db = (HotSpotTypeDataBase)CommandProcessor.access$900(this$0).getTypeDataBase();
      db.createField(containingType, fieldName, fieldType, isStatic, offset, staticAddress);
    }
  }
}

/* Location:
 * Qualified Name:     sun.jvm.hotspot.CommandProcessor.23
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package sun.jvm.hotspot;

import java.io.PrintStream;

final class CommandProcessor$24
  extends CommandProcessor.Command
{
  private final CommandProcessor this$0;
  
  CommandProcessor$24(CommandProcessor paramCommandProcessor, String x0, String x1, boolean x2)
  {
    super(paramCommandProcessor, x0, x1, x2);
  }
  
  public void doit(CommandProcessor.Tokens t)
  {
    while (t.hasMoreTokens()) {
      CommandProcessor.access$000(this$0).println("\"" + t.nextToken() + "\"");
    }
  }
}

/* Location:
 * Qualified Name:     sun.jvm.hotspot.CommandProcessor.24
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package sun.jvm.hotspot;

import java.util.HashSet;
import java.util.Iterator;
import java.util.Stack;
import sun.jvm.hotspot.types.CIntegerType;
import sun.jvm.hotspot.types.Type;
import sun.jvm.hotspot.types.TypeDataBase;
import sun.jvm.hotspot.types.basic.BasicType;

final class CommandProcessor$25
  extends CommandProcessor.Command
{
  private final CommandProcessor this$0;
  
  CommandProcessor$25(CommandProcessor paramCommandProcessor, String x0, String x1, boolean x2)
  {
    super(paramCommandProcessor, x0, x1, x2);
  }
  
  public void doit(CommandProcessor.Tokens t)
  {
    if ((t.countTokens() != 1) && (t.countTokens() != 0) && (t.countTokens() != 6))
    {
      usage();
      return;
    }
    if (t.countTokens() == 6)
    {
      String typeName = t.nextToken();
      String superclassName = t.nextToken();
      if (superclassName.equals("null")) {
        superclassName = null;
      }
      boolean isOop = Boolean.valueOf(t.nextToken()).booleanValue();
      boolean isInteger = Boolean.valueOf(t.nextToken()).booleanValue();
      boolean isUnsigned = Boolean.valueOf(t.nextToken()).booleanValue();
      long size = Long.parseLong(t.nextToken());
      
      BasicType type = null;
      try
      {
        type = (BasicType)CommandProcessor.access$900(this$0).getTypeDataBase().lookupType(typeName);
      }
      catch (RuntimeException e) {}
      if (type != null)
      {
        if (type.isOopType() != isOop) {
          throw new RuntimeException("oop mismatch in type definition: " + input);
        }
        if (type.isCIntegerType() != isInteger) {
          throw new RuntimeException("integer type mismatch in type definition: " + input);
        }
        if ((type.isCIntegerType()) && (((CIntegerType)type).isUnsigned() != isUnsigned)) {
          throw new RuntimeException("unsigned mismatch in type definition: " + input);
        }
        if (type.getSuperclass() == null)
        {
          if (superclassName != null) {
            if (type.getSize() == -1L) {
              type.setSuperclass(CommandProcessor.access$900(this$0).getTypeDataBase().lookupType(superclassName));
            } else {
              throw new RuntimeException("unexpected superclass in type definition: " + input);
            }
          }
        }
        else
        {
          if (superclassName == null) {
            throw new RuntimeException("missing superclass in type definition: " + input);
          }
          if (!type.getSuperclass().getName().equals(superclassName)) {
            throw new RuntimeException("incorrect superclass in type definition: " + input);
          }
        }
        if (type.getSize() != size)
        {
          if (type.getSize() == -1L) {
            type.setSize(size);
          }
          throw new RuntimeException("size mismatch in type definition: " + input);
        }
        return;
      }
      HotSpotTypeDataBase db = (HotSpotTypeDataBase)CommandProcessor.access$900(this$0).getTypeDataBase();
      db.createType(typeName, superclassName, isOop, isInteger, isUnsigned, size);
    }
    else if (t.countTokens() == 1)
    {
      Type type = CommandProcessor.access$900(this$0).getTypeDataBase().lookupType(t.nextToken());
      this$0.dumpType(type);
    }
    else
    {
      Iterator i = CommandProcessor.access$900(this$0).getTypeDataBase().getTypes();
      
      HashSet emitted = new HashSet();
      Stack pending = new Stack();
      while (i.hasNext())
      {
        Type n = (Type)i.next();
        if (!emitted.contains(n.getName()))
        {
          while ((n != null) && (!emitted.contains(n.getName())))
          {
            pending.push(n);
            n = n.getSuperclass();
          }
          while (!pending.empty())
          {
            n = (Type)pending.pop();
            this$0.dumpType(n);
            emitted.add(n.getName());
          }
        }
      }
    }
  }
}

/* Location:
 * Qualified Name:     sun.jvm.hotspot.CommandProcessor.25
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package sun.jvm.hotspot;

import java.io.BufferedReader;
import java.io.FileInputStream;
import java.io.InputStreamReader;
import java.io.PrintStream;

final class CommandProcessor$26
  extends CommandProcessor.Command
{
  private final CommandProcessor this$0;
  
  CommandProcessor$26(CommandProcessor paramCommandProcessor, String x0, String x1, boolean x2)
  {
    super(paramCommandProcessor, x0, x1, x2);
  }
  
  public void doit(CommandProcessor.Tokens t)
  {
    if (t.countTokens() != 1)
    {
      usage();
      return;
    }
    String file = t.nextToken();
    BufferedReader savedInput = CommandProcessor.access$1100(this$0);
    try
    {
      BufferedReader input = new BufferedReader(new InputStreamReader(new FileInputStream(file)));
      CommandProcessor.access$1102(this$0, input);
      this$0.run(false);
    }
    catch (Exception e)
    {
      CommandProcessor.access$000(this$0).println("Error: " + e);
      if (CommandProcessor.access$100(this$0)) {
        e.printStackTrace(CommandProcessor.access$000(this$0));
      }
    }
    finally
    {
      CommandProcessor.access$1102(this$0, savedInput);
    }
  }
}

/* Location:
 * Qualified Name:     sun.jvm.hotspot.CommandProcessor.26
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package sun.jvm.hotspot;

import java.io.PrintStream;
import sun.jvm.hotspot.debugger.Address;
import sun.jvm.hotspot.oops.RawHeapVisitor;
import sun.jvm.hotspot.utilities.AddressOps;

final class CommandProcessor$27$1
  implements RawHeapVisitor
{
  private final CommandProcessor.27 this$1;
  
  CommandProcessor$27$1(CommandProcessor.27 param27, Address paramAddress) {}
  
  public void prologue(long used) {}
  
  public void visitAddress(Address addr)
  {
    Address val = addr.getAddressAt(0L);
    if (AddressOps.equal(val, val$value)) {
      CommandProcessor.access$000(CommandProcessor.27.access$1200(this$1)).println("found at " + addr);
    }
  }
  
  public void visitCompOopAddress(Address addr)
  {
    Address val = addr.getCompOopAddressAt(0L);
    if (AddressOps.equal(val, val$value)) {
      CommandProcessor.access$000(CommandProcessor.27.access$1200(this$1)).println("found at " + addr);
    }
  }
  
  public void epilogue() {}
}

/* Location:
 * Qualified Name:     sun.jvm.hotspot.CommandProcessor.27.1
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package sun.jvm.hotspot;

import java.io.PrintStream;
import sun.jvm.hotspot.debugger.Address;
import sun.jvm.hotspot.oops.DefaultHeapVisitor;
import sun.jvm.hotspot.oops.Oop;
import sun.jvm.hotspot.utilities.AddressOps;

final class CommandProcessor$27$2
  extends DefaultHeapVisitor
{
  private final CommandProcessor.27 this$1;
  
  CommandProcessor$27$2(CommandProcessor.27 param27, Address paramAddress) {}
  
  public boolean doObj(Oop obj)
  {
    int index = 0;
    Address start = obj.getHandle();
    long end = obj.getObjectSize();
    while (index < end)
    {
      Address val = start.getAddressAt(index);
      if (AddressOps.equal(val, val$value))
      {
        CommandProcessor.access$000(CommandProcessor.27.access$1200(this$1)).println("found in " + obj.getHandle());
        break;
      }
      index += 4;
    }
    return false;
  }
}

/* Location:
 * Qualified Name:     sun.jvm.hotspot.CommandProcessor.27.2
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package sun.jvm.hotspot;

import java.io.PrintStream;
import sun.jvm.hotspot.code.CodeBlob;
import sun.jvm.hotspot.code.CodeCacheVisitor;
import sun.jvm.hotspot.debugger.Address;
import sun.jvm.hotspot.utilities.AddressOps;

final class CommandProcessor$27$3
  implements CodeCacheVisitor
{
  private final CommandProcessor.27 this$1;
  
  CommandProcessor$27$3(CommandProcessor.27 param27, Address paramAddress, long paramLong) {}
  
  public void prologue(Address start, Address end) {}
  
  public void visit(CodeBlob blob)
  {
    boolean printed = false;
    Address base = blob.getAddress();
    Address end = base.addOffsetTo(blob.getSize());
    while ((base != null) && (base.lessThan(end)))
    {
      Address val = base.getAddressAt(0L);
      if (AddressOps.equal(val, val$value))
      {
        if (!printed)
        {
          printed = true;
          blob.printOn(CommandProcessor.access$000(CommandProcessor.27.access$1200(this$1)));
        }
        CommandProcessor.access$000(CommandProcessor.27.access$1200(this$1)).println("found at " + base + "\n");
      }
      base = base.addOffsetTo(val$stride);
    }
  }
  
  public void epilogue() {}
}

/* Location:
 * Qualified Name:     sun.jvm.hotspot.CommandProcessor.27.3
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package sun.jvm.hotspot;

import java.io.PrintStream;
import sun.jvm.hotspot.code.CodeBlob;
import sun.jvm.hotspot.code.CodeCache;
import sun.jvm.hotspot.code.CodeCacheVisitor;
import sun.jvm.hotspot.debugger.Address;
import sun.jvm.hotspot.debugger.JVMDebugger;
import sun.jvm.hotspot.oops.DefaultHeapVisitor;
import sun.jvm.hotspot.oops.HeapVisitor;
import sun.jvm.hotspot.oops.ObjectHeap;
import sun.jvm.hotspot.oops.Oop;
import sun.jvm.hotspot.oops.RawHeapVisitor;
import sun.jvm.hotspot.runtime.JavaThread;
import sun.jvm.hotspot.runtime.Threads;
import sun.jvm.hotspot.runtime.VM;
import sun.jvm.hotspot.utilities.AddressOps;

final class CommandProcessor$27
  extends CommandProcessor.Command
{
  private final CommandProcessor this$0;
  
  CommandProcessor$27(CommandProcessor paramCommandProcessor, String x0, String x1, boolean x2)
  {
    super(paramCommandProcessor, x0, x1, x2);
  }
  
  public void doit(CommandProcessor.Tokens t)
  {
    if (t.countTokens() != 2)
    {
      usage();
      return;
    }
    String type = t.nextToken();
    final Address value = VM.getVM().getDebugger().parseAddress(t.nextToken());
    final long stride = VM.getVM().getAddressSize();
    if (type.equals("threads"))
    {
      Threads threads = VM.getVM().getThreads();
      for (JavaThread thread = threads.first(); thread != null; thread = thread.next())
      {
        Address base = thread.getBaseOfStackPointer();
        Address end = thread.getLastJavaSP();
        if (end != null)
        {
          if (end.lessThan(base))
          {
            Address tmp = base;
            base = end;
            end = tmp;
          }
          CommandProcessor.access$000(this$0).println("Searching " + base + " " + end);
          while ((base != null) && (base.lessThan(end)))
          {
            Address val = base.getAddressAt(0L);
            if (AddressOps.equal(val, value)) {
              CommandProcessor.access$000(this$0).println(base);
            }
            base = base.addOffsetTo(stride);
          }
        }
      }
    }
    else if (type.equals("rawheap"))
    {
      RawHeapVisitor iterator = new RawHeapVisitor()
      {
        public void prologue(long used) {}
        
        public void visitAddress(Address addr)
        {
          Address val = addr.getAddressAt(0L);
          if (AddressOps.equal(val, value)) {
            CommandProcessor.access$000(this$0).println("found at " + addr);
          }
        }
        
        public void visitCompOopAddress(Address addr)
        {
          Address val = addr.getCompOopAddressAt(0L);
          if (AddressOps.equal(val, value)) {
            CommandProcessor.access$000(this$0).println("found at " + addr);
          }
        }
        
        public void epilogue() {}
      };
      VM.getVM().getObjectHeap().iterateRaw(iterator);
    }
    else if ((type.equals("heap")) || (type.equals("perm")))
    {
      HeapVisitor iterator = new DefaultHeapVisitor()
      {
        public boolean doObj(Oop obj)
        {
          int index = 0;
          Address start = obj.getHandle();
          long end = obj.getObjectSize();
          while (index < end)
          {
            Address val = start.getAddressAt(index);
            if (AddressOps.equal(val, value))
            {
              CommandProcessor.access$000(this$0).println("found in " + obj.getHandle());
              break;
            }
            index += 4;
          }
          return false;
        }
      };
      if (type.equals("heap")) {
        VM.getVM().getObjectHeap().iterate(iterator);
      } else {
        VM.getVM().getObjectHeap().iteratePerm(iterator);
      }
    }
    else if (type.equals("codecache"))
    {
      CodeCacheVisitor v = new CodeCacheVisitor()
      {
        public void prologue(Address start, Address end) {}
        
        public void visit(CodeBlob blob)
        {
          boolean printed = false;
          Address base = blob.getAddress();
          Address end = base.addOffsetTo(blob.getSize());
          while ((base != null) && (base.lessThan(end)))
          {
            Address val = base.getAddressAt(0L);
            if (AddressOps.equal(val, value))
            {
              if (!printed)
              {
                printed = true;
                blob.printOn(CommandProcessor.access$000(this$0));
              }
              CommandProcessor.access$000(this$0).println("found at " + base + "\n");
            }
            base = base.addOffsetTo(stride);
          }
        }
        
        public void epilogue() {}
      };
      VM.getVM().getCodeCache().iterate(v);
    }
  }
}

/* Location:
 * Qualified Name:     sun.jvm.hotspot.CommandProcessor.27
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package sun.jvm.hotspot;

import java.io.PrintStream;
import sun.jvm.hotspot.code.CodeBlob;
import sun.jvm.hotspot.code.CodeCacheVisitor;
import sun.jvm.hotspot.debugger.Address;
import sun.jvm.hotspot.ui.classbrowser.HTMLGenerator;

final class CommandProcessor$28$1
  implements CodeCacheVisitor
{
  private final CommandProcessor.28 this$1;
  
  CommandProcessor$28$1(CommandProcessor.28 param28, PrintStream paramPrintStream, HTMLGenerator paramHTMLGenerator) {}
  
  public void prologue(Address start, Address end) {}
  
  public void visit(CodeBlob blob)
  {
    val$fout.println(val$gen.genHTML(blob.contentBegin()));
  }
  
  public void epilogue() {}
}

/* Location:
 * Qualified Name:     sun.jvm.hotspot.CommandProcessor.28.1
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package sun.jvm.hotspot;

import java.io.PrintStream;
import sun.jvm.hotspot.code.CodeBlob;
import sun.jvm.hotspot.code.CodeCache;
import sun.jvm.hotspot.code.CodeCacheVisitor;
import sun.jvm.hotspot.debugger.Address;
import sun.jvm.hotspot.runtime.VM;
import sun.jvm.hotspot.ui.classbrowser.HTMLGenerator;

final class CommandProcessor$28
  extends CommandProcessor.Command
{
  private final CommandProcessor this$0;
  
  CommandProcessor$28(CommandProcessor paramCommandProcessor, String x0, String x1, boolean x2)
  {
    super(paramCommandProcessor, x0, x1, x2);
  }
  
  public void doit(CommandProcessor.Tokens t)
  {
    if (t.countTokens() != 0)
    {
      usage();
    }
    else
    {
      final PrintStream fout = CommandProcessor.access$000(this$0);
      final HTMLGenerator gen = new HTMLGenerator(false);
      CodeCacheVisitor v = new CodeCacheVisitor()
      {
        public void prologue(Address start, Address end) {}
        
        public void visit(CodeBlob blob)
        {
          fout.println(gen.genHTML(blob.contentBegin()));
        }
        
        public void epilogue() {}
      };
      VM.getVM().getCodeCache().iterate(v);
    }
  }
}

/* Location:
 * Qualified Name:     sun.jvm.hotspot.CommandProcessor.28
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package sun.jvm.hotspot;

import java.io.ByteArrayOutputStream;
import java.io.PrintStream;
import sun.jvm.hotspot.runtime.JavaThread;
import sun.jvm.hotspot.runtime.Threads;
import sun.jvm.hotspot.runtime.VM;
import sun.jvm.hotspot.ui.classbrowser.HTMLGenerator;

final class CommandProcessor$29
  extends CommandProcessor.Command
{
  private final CommandProcessor this$0;
  
  CommandProcessor$29(CommandProcessor paramCommandProcessor, String x0, String x1, boolean x2)
  {
    super(paramCommandProcessor, x0, x1, x2);
  }
  
  public void doit(CommandProcessor.Tokens t)
  {
    if (t.countTokens() != 1)
    {
      usage();
    }
    else
    {
      String name = t.nextToken();
      Threads threads = VM.getVM().getThreads();
      boolean all = name.equals("-a");
      for (JavaThread thread = threads.first(); thread != null; thread = thread.next())
      {
        ByteArrayOutputStream bos = new ByteArrayOutputStream();
        thread.printThreadIDOn(new PrintStream(bos));
        if ((all) || (bos.toString().equals(name)))
        {
          CommandProcessor.access$000(this$0).println(bos.toString() + " = " + thread.getAddress());
          HTMLGenerator gen = new HTMLGenerator(false);
          try
          {
            CommandProcessor.access$000(this$0).println(gen.genHTMLForJavaStackTrace(thread));
          }
          catch (Exception e)
          {
            CommandProcessor.access$800(this$0).println("Error: " + e);
            if (CommandProcessor.access$100(this$0)) {
              e.printStackTrace(CommandProcessor.access$800(this$0));
            }
          }
          if (!all) {
            return;
          }
        }
      }
      if (!all) {
        CommandProcessor.access$000(this$0).println("Couldn't find thread " + name);
      }
    }
  }
}

/* Location:
 * Qualified Name:     sun.jvm.hotspot.CommandProcessor.29
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package sun.jvm.hotspot;

final class CommandProcessor$3
  extends CommandProcessor.Command
{
  private final CommandProcessor this$0;
  
  CommandProcessor$3(CommandProcessor paramCommandProcessor, String x0, boolean x1)
  {
    super(paramCommandProcessor, x0, x1);
  }
  
  public void doit(CommandProcessor.Tokens t)
  {
    if (t.countTokens() != 0) {
      usage();
    } else {
      CommandProcessor.access$300(this$0).detach();
    }
  }
}

/* Location:
 * Qualified Name:     sun.jvm.hotspot.CommandProcessor.3
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package sun.jvm.hotspot;

import java.io.ByteArrayOutputStream;
import java.io.PrintStream;
import sun.jvm.hotspot.runtime.JavaThread;
import sun.jvm.hotspot.runtime.Threads;
import sun.jvm.hotspot.runtime.VM;

final class CommandProcessor$30
  extends CommandProcessor.Command
{
  private final CommandProcessor this$0;
  
  CommandProcessor$30(CommandProcessor paramCommandProcessor, String x0, String x1, boolean x2)
  {
    super(paramCommandProcessor, x0, x1, x2);
  }
  
  public void doit(CommandProcessor.Tokens t)
  {
    if (t.countTokens() != 1)
    {
      usage();
    }
    else
    {
      String name = t.nextToken();
      Threads threads = VM.getVM().getThreads();
      boolean all = name.equals("-a");
      for (JavaThread thread = threads.first(); thread != null; thread = thread.next())
      {
        ByteArrayOutputStream bos = new ByteArrayOutputStream();
        thread.printThreadIDOn(new PrintStream(bos));
        if ((all) || (bos.toString().equals(name)))
        {
          CommandProcessor.access$000(this$0).println(bos.toString() + " = " + thread.getAddress());
          if (!all) {
            return;
          }
        }
      }
      CommandProcessor.access$000(this$0).println("Couldn't find thread " + name);
    }
  }
}

/* Location:
 * Qualified Name:     sun.jvm.hotspot.CommandProcessor.30
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package sun.jvm.hotspot;

import java.io.PrintStream;
import sun.jvm.hotspot.runtime.JavaThread;
import sun.jvm.hotspot.runtime.Threads;
import sun.jvm.hotspot.runtime.VM;

final class CommandProcessor$31
  extends CommandProcessor.Command
{
  private final CommandProcessor this$0;
  
  CommandProcessor$31(CommandProcessor paramCommandProcessor, String x0, boolean x1)
  {
    super(paramCommandProcessor, x0, x1);
  }
  
  public void doit(CommandProcessor.Tokens t)
  {
    if (t.countTokens() != 0)
    {
      usage();
    }
    else
    {
      Threads threads = VM.getVM().getThreads();
      for (JavaThread thread = threads.first(); thread != null; thread = thread.next())
      {
        thread.printThreadIDOn(CommandProcessor.access$000(this$0));
        CommandProcessor.access$000(this$0).println(" " + thread.getThreadName());
      }
    }
  }
}

/* Location:
 * Qualified Name:     sun.jvm.hotspot.CommandProcessor.31
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package sun.jvm.hotspot;

import java.io.PrintStream;
import java.util.ArrayList;
import sun.jvm.hotspot.code.NMethod;
import sun.jvm.hotspot.runtime.CompiledVFrame;
import sun.jvm.hotspot.runtime.JavaThread;
import sun.jvm.hotspot.runtime.JavaVFrame;
import sun.jvm.hotspot.runtime.Threads;
import sun.jvm.hotspot.runtime.VM;
import sun.jvm.hotspot.ui.classbrowser.HTMLGenerator;

final class CommandProcessor$32
  extends CommandProcessor.Command
{
  private final CommandProcessor this$0;
  
  CommandProcessor$32(CommandProcessor paramCommandProcessor, String x0, boolean x1)
  {
    super(paramCommandProcessor, x0, x1);
  }
  
  public void doit(CommandProcessor.Tokens t)
  {
    if (t.countTokens() != 0)
    {
      usage();
    }
    else
    {
      ArrayList nmethods = new ArrayList();
      Threads threads = VM.getVM().getThreads();
      HTMLGenerator gen = new HTMLGenerator(false);
      for (JavaThread thread = threads.first(); thread != null; thread = thread.next()) {
        try
        {
          for (JavaVFrame vf = thread.getLastJavaVFrameDbg(); vf != null; vf = vf.javaSender()) {
            if ((vf instanceof CompiledVFrame))
            {
              NMethod c = ((CompiledVFrame)vf).getCode();
              if (!nmethods.contains(c))
              {
                nmethods.add(c);
                CommandProcessor.access$000(this$0).println(gen.genHTML(c));
              }
            }
          }
        }
        catch (Exception e)
        {
          e.printStackTrace();
        }
      }
    }
  }
}

/* Location:
 * Qualified Name:     sun.jvm.hotspot.CommandProcessor.32
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package sun.jvm.hotspot;

import java.io.PrintStream;
import sun.jvm.hotspot.gc_interface.CollectedHeap;
import sun.jvm.hotspot.memory.Universe;
import sun.jvm.hotspot.runtime.VM;

final class CommandProcessor$33
  extends CommandProcessor.Command
{
  private final CommandProcessor this$0;
  
  CommandProcessor$33(CommandProcessor paramCommandProcessor, String x0, boolean x1)
  {
    super(paramCommandProcessor, x0, x1);
  }
  
  public void doit(CommandProcessor.Tokens t)
  {
    if (t.countTokens() != 0)
    {
      usage();
    }
    else
    {
      Universe u = VM.getVM().getUniverse();
      CommandProcessor.access$000(this$0).println("Heap Parameters:");
      u.heap().printOn(CommandProcessor.access$000(this$0));
    }
  }
}

/* Location:
 * Qualified Name:     sun.jvm.hotspot.CommandProcessor.33
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package sun.jvm.hotspot;

final class CommandProcessor$34
  extends CommandProcessor.Command
{
  private final CommandProcessor this$0;
  
  CommandProcessor$34(CommandProcessor paramCommandProcessor, String x0, String x1, boolean x2)
  {
    super(paramCommandProcessor, x0, x1, x2);
  }
  
  public void doit(CommandProcessor.Tokens t)
  {
    if (t.countTokens() != 1) {
      usage();
    } else {
      CommandProcessor.access$102(this$0, Boolean.valueOf(t.nextToken()).booleanValue());
    }
  }
}

/* Location:
 * Qualified Name:     sun.jvm.hotspot.CommandProcessor.34
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package sun.jvm.hotspot;

final class CommandProcessor$35
  extends CommandProcessor.Command
{
  private final CommandProcessor this$0;
  
  CommandProcessor$35(CommandProcessor paramCommandProcessor, String x0, String x1, boolean x2)
  {
    super(paramCommandProcessor, x0, x1, x2);
  }
  
  public void doit(CommandProcessor.Tokens t)
  {
    if (t.countTokens() != 1) {
      usage();
    } else {
      sun.jvm.hotspot.utilities.Assert.ASSERTS_ENABLED = Boolean.valueOf(t.nextToken()).booleanValue();
    }
  }
}

/* Location:
 * Qualified Name:     sun.jvm.hotspot.CommandProcessor.35
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package sun.jvm.hotspot;

import java.io.BufferedReader;
import java.io.PrintStream;
import sun.jvm.hotspot.utilities.ObjectReader;
import sun.jvm.hotspot.utilities.soql.JSJavaFactory;
import sun.jvm.hotspot.utilities.soql.JSJavaFactoryImpl;
import sun.jvm.hotspot.utilities.soql.JSJavaScriptEngine;

final class CommandProcessor$36
  extends JSJavaScriptEngine
{
  private ObjectReader reader = new ObjectReader();
  private JSJavaFactory factory = new JSJavaFactoryImpl();
  private final CommandProcessor this$0;
  
  CommandProcessor$36(CommandProcessor paramCommandProcessor) {}
  
  public ObjectReader getObjectReader()
  {
    return reader;
  }
  
  public JSJavaFactory getJSJavaFactory()
  {
    return factory;
  }
  
  protected void quit()
  {
    CommandProcessor.access$300(this$0).detach();
    System.exit(0);
  }
  
  protected BufferedReader getInputReader()
  {
    return CommandProcessor.access$1100(this$0);
  }
  
  protected PrintStream getOutputStream()
  {
    return CommandProcessor.access$000(this$0);
  }
  
  protected PrintStream getErrorStream()
  {
    return CommandProcessor.access$800(this$0);
  }
}

/* Location:
 * Qualified Name:     sun.jvm.hotspot.CommandProcessor.36
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package sun.jvm.hotspot;

import sun.jvm.hotspot.utilities.soql.JSJavaScriptEngine;

final class CommandProcessor$37
  extends CommandProcessor.Command
{
  private final CommandProcessor this$0;
  
  CommandProcessor$37(CommandProcessor paramCommandProcessor, String x0, String x1, boolean x2, String paramString1)
  {
    super(paramCommandProcessor, x0, x1, x2);
  }
  
  public void doit(CommandProcessor.Tokens t)
  {
    int len = t.countTokens();
    Object[] args = new Object[len];
    for (int i = 0; i < len; i++) {
      args[i] = t.nextToken();
    }
    CommandProcessor.access$1300(this$0).call(val$func, args);
  }
}

/* Location:
 * Qualified Name:     sun.jvm.hotspot.CommandProcessor.37
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package sun.jvm.hotspot;

import java.io.PrintStream;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import sun.jvm.hotspot.debugger.Address;
import sun.jvm.hotspot.debugger.JVMDebugger;
import sun.jvm.hotspot.runtime.VM;

final class CommandProcessor$4
  extends CommandProcessor.Command
{
  CommandProcessor$4(CommandProcessor paramCommandProcessor, String x0, String x1, boolean x2)
  {
    super(paramCommandProcessor, x0, x1, x2);
  }
  
  Pattern args1 = Pattern.compile("^(0x[0-9a-f]+)(/([0-9]*)([a-z]*))?$");
  Pattern args2 = Pattern.compile("^(0x[0-9a-f]+),(0x[0-9a-f]+)(/[a-z]*)?$");
  private final CommandProcessor this$0;
  
  String fill(Address a, int width)
  {
    String s = "0x0";
    if (a != null) {
      s = a.toString();
    }
    if (s.length() != width) {
      return s.substring(0, 2) + "000000000000000000000".substring(0, width - s.length()) + s.substring(2);
    }
    return s;
  }
  
  public void doit(CommandProcessor.Tokens t)
  {
    if (t.countTokens() != 1)
    {
      usage();
    }
    else
    {
      String arg = t.nextToken();
      Matcher m1 = args1.matcher(arg);
      Matcher m2 = args2.matcher(arg);
      Address start = null;
      Address end = null;
      String format = "";
      int formatSize = (int)VM.getVM().getAddressSize();
      if (m1.matches())
      {
        start = VM.getVM().getDebugger().parseAddress(m1.group(1));
        int count = 1;
        if (m1.group(2) != null) {
          count = Integer.parseInt(m1.group(3));
        }
        end = start.addOffsetTo(count * formatSize);
      }
      else if (m2.matches())
      {
        start = VM.getVM().getDebugger().parseAddress(m2.group(1));
        end = VM.getVM().getDebugger().parseAddress(m2.group(2));
      }
      else
      {
        usage();
        return;
      }
      int line = 80;
      int formatWidth = formatSize * 8 / 4 + 2;
      
      CommandProcessor.access$000(this$0).print(fill(start, formatWidth));
      CommandProcessor.access$000(this$0).print(": ");
      int width = line - formatWidth - 2;
      
      boolean needsPrintln = true;
      while ((start != null) && (start.lessThan(end)))
      {
        Address val = start.getAddressAt(0L);
        CommandProcessor.access$000(this$0).print(fill(val, formatWidth));
        needsPrintln = true;
        width -= formatWidth;
        start = start.addOffsetTo(formatSize);
        if (width <= formatWidth)
        {
          CommandProcessor.access$000(this$0).println();
          needsPrintln = false;
          if (start.lessThan(end))
          {
            CommandProcessor.access$000(this$0).print(fill(start, formatWidth));
            CommandProcessor.access$000(this$0).print(": ");
            width = line - formatWidth - 2;
          }
        }
        else
        {
          CommandProcessor.access$000(this$0).print(" ");
          width--;
        }
      }
      if (needsPrintln) {
        CommandProcessor.access$000(this$0).println();
      }
    }
  }
}

/* Location:
 * Qualified Name:     sun.jvm.hotspot.CommandProcessor.4
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package sun.jvm.hotspot;

import sun.jvm.hotspot.debugger.Address;
import sun.jvm.hotspot.debugger.JVMDebugger;
import sun.jvm.hotspot.runtime.VM;
import sun.jvm.hotspot.utilities.PointerFinder;
import sun.jvm.hotspot.utilities.PointerLocation;

final class CommandProcessor$5
  extends CommandProcessor.Command
{
  private final CommandProcessor this$0;
  
  CommandProcessor$5(CommandProcessor paramCommandProcessor, String x0, String x1, boolean x2)
  {
    super(paramCommandProcessor, x0, x1, x2);
  }
  
  public void doit(CommandProcessor.Tokens t)
  {
    if (t.countTokens() != 1)
    {
      usage();
    }
    else
    {
      Address a = VM.getVM().getDebugger().parseAddress(t.nextToken());
      PointerLocation loc = PointerFinder.find(a);
      loc.printOn(CommandProcessor.access$000(this$0));
    }
  }
}

/* Location:
 * Qualified Name:     sun.jvm.hotspot.CommandProcessor.5
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package sun.jvm.hotspot;

import java.io.PrintStream;
import sun.jvm.hotspot.runtime.VM;
import sun.jvm.hotspot.runtime.VM.Flag;

final class CommandProcessor$6
  extends CommandProcessor.Command
{
  private final CommandProcessor this$0;
  
  CommandProcessor$6(CommandProcessor paramCommandProcessor, String x0, String x1,
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114

Further reading...

For more information on Java 1.5 Tiger, you may find Java 1.5 Tiger, A developer's Notebook by D. Flanagan and B. McLaughlin from O'Reilly of interest.

New!JAR listings


Copyright 2006-2019. Infinite Loop Ltd