/hg/openjdk6-mips: Added some missing files.

liuqi at icedtea.classpath.org liuqi at icedtea.classpath.org
Mon Nov 1 21:07:09 PDT 2010


changeset a7a1c6bde40a in /hg/openjdk6-mips
details: http://icedtea.classpath.org/hg/openjdk6-mips?cmd=changeset;node=a7a1c6bde40a
author: Ao Qi <aoqi at loongson.cn>
date: Tue Nov 02 10:34:12 2010 +0800

	Added some missing files.

	These files are omitted in the previous commit to fix the building
	complete JRE problem.


diffstat:

14 files changed, 800 insertions(+)
hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/dbx/mips/DbxMIPSThread.java              |   86 +++++++
hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/dbx/mips/DbxMIPSThreadContext.java       |   46 +++
hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/dbx/mips/DbxMIPSThreadFactory.java       |   44 +++
hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/linux/mips/LinuxMIPSCFrame.java          |   75 ++++++
hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/linux/mips/LinuxMIPSThreadContext.java   |   46 +++
hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/mips/MIPSThreadContext.java              |  118 ++++++++++
hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/proc/mips/ProcMIPSThread.java            |   91 +++++++
hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/proc/mips/ProcMIPSThreadContext.java     |   46 +++
hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/proc/mips/ProcMIPSThreadFactory.java     |   44 +++
hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/remote/mips/RemoteMIPSThread.java        |   53 ++++
hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/remote/mips/RemoteMIPSThreadContext.java |   50 ++++
hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/remote/mips/RemoteMIPSThreadFactory.java |   44 +++
hotspot/make/linux/makefiles/mipsel.make                                                          |   42 +++
hotspot/make/linux/platform_mipsel                                                                |   15 +

diffs (truncated from 856 to 500 lines):

diff -r d0a60cd6d61c -r a7a1c6bde40a hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/dbx/mips/DbxMIPSThread.java
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/dbx/mips/DbxMIPSThread.java	Tue Nov 02 10:34:12 2010 +0800
@@ -0,0 +1,86 @@
+/*
+ * Copyright 2010 Lemote, Inc.  All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ *
+ */
+
+package sun.jvm.hotspot.debugger.dbx.mips;
+
+import sun.jvm.hotspot.debugger.*;
+import sun.jvm.hotspot.debugger.mips.*;
+import sun.jvm.hotspot.debugger.dbx.*;
+import sun.jvm.hotspot.utilities.*;
+
+public class DbxMIPSThread implements ThreadProxy {
+  private DbxDebugger debugger;
+  private int         id;
+
+  public DbxMIPSThread(DbxDebugger debugger, Address addr) {
+    this.debugger = debugger;
+
+    // FIXME: the size here should be configurable. However, making it
+    // so would produce a dependency on the "types" package from the
+    // debugger package, which is not desired.
+    this.id       = (int) addr.getCIntegerAt(0, 4, true);
+  }
+
+  public DbxMIPSThread(DbxDebugger debugger, long id) {
+    this.debugger = debugger;
+    this.id  = (int) id;
+  }
+
+  public boolean equals(Object obj) {
+    if ((obj == null) || !(obj instanceof DbxMIPSThread)) {
+      return false;
+    }
+
+    return (((DbxMIPSThread) obj).id == id);
+  }
+
+  public int hashCode() {
+    return id;
+  }
+
+  public ThreadContext getContext() throws IllegalThreadStateException {
+    DbxMIPSThreadContext context = new DbxMIPSThreadContext(debugger);
+    long[] regs = debugger.getThreadIntegerRegisterSet(id);
+    if (Assert.ASSERTS_ENABLED) {
+      Assert.that(regs.length == 19, "unknown size of register set -- adjust this code");
+    }
+    for (int i = 0; i < regs.length; i++) {
+      context.setRegister(i, regs[i]);
+    }
+    return context;
+  }
+
+  public boolean canSetContext() throws DebuggerException {
+    return false;
+  }
+
+  public void setContext(ThreadContext context)
+    throws IllegalThreadStateException, DebuggerException {
+    throw new DebuggerException("Unimplemented");
+  }
+
+  public String toString() {
+    return "t@" + id;
+  }
+}
diff -r d0a60cd6d61c -r a7a1c6bde40a hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/dbx/mips/DbxMIPSThreadContext.java
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/dbx/mips/DbxMIPSThreadContext.java	Tue Nov 02 10:34:12 2010 +0800
@@ -0,0 +1,46 @@
+/*
+ * Copyright 2010 Lemote, Inc.  All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ *
+ */
+
+package sun.jvm.hotspot.debugger.dbx.mips;
+
+import sun.jvm.hotspot.debugger.*;
+import sun.jvm.hotspot.debugger.mips.*;
+import sun.jvm.hotspot.debugger.dbx.*;
+
+public class DbxMIPSThreadContext extends MIPSThreadContext {
+  private DbxDebugger debugger;
+
+  public DbxMIPSThreadContext(DbxDebugger debugger) {
+    super();
+    this.debugger = debugger;
+  }
+
+  public void setRegisterAsAddress(int index, Address value) {
+    setRegister(index, debugger.getAddressValue(value));
+  }
+
+  public Address getRegisterAsAddress(int index) {
+    return debugger.newAddress(getRegister(index));
+  }
+}
diff -r d0a60cd6d61c -r a7a1c6bde40a hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/dbx/mips/DbxMIPSThreadFactory.java
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/dbx/mips/DbxMIPSThreadFactory.java	Tue Nov 02 10:34:12 2010 +0800
@@ -0,0 +1,44 @@
+/*
+ * Copyright 2010 Lemote, Inc.  All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ *
+ */
+
+package sun.jvm.hotspot.debugger.dbx.mips;
+
+import sun.jvm.hotspot.debugger.*;
+import sun.jvm.hotspot.debugger.dbx.*;
+
+public class DbxMIPSThreadFactory implements DbxThreadFactory {
+  private DbxDebugger debugger;
+
+  public DbxMIPSThreadFactory(DbxDebugger debugger) {
+    this.debugger = debugger;
+  }
+
+  public ThreadProxy createThreadWrapper(Address threadIdentifierAddr) {
+    return new DbxMIPSThread(debugger, threadIdentifierAddr);
+  }
+
+  public ThreadProxy createThreadWrapper(long id) {
+    return new DbxMIPSThread(debugger, id);
+  }
+}
diff -r d0a60cd6d61c -r a7a1c6bde40a hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/linux/mips/LinuxMIPSCFrame.java
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/linux/mips/LinuxMIPSCFrame.java	Tue Nov 02 10:34:12 2010 +0800
@@ -0,0 +1,75 @@
+/*
+ * Copyright 2010 Lemote, Inc.  All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ *
+ */
+
+package sun.jvm.hotspot.debugger.linux.mips;
+
+import sun.jvm.hotspot.debugger.*;
+import sun.jvm.hotspot.debugger.linux.*;
+import sun.jvm.hotspot.debugger.cdbg.*;
+import sun.jvm.hotspot.debugger.cdbg.basic.*;
+
+final public class LinuxMIPSCFrame extends BasicCFrame {
+   // package/class internals only
+   public LinuxMIPSCFrame(LinuxDebugger dbg, Address ebp, Address pc) {
+      super(dbg.getCDebugger());
+      this.ebp = ebp;
+      this.pc = pc;
+      this.dbg = dbg;
+   }
+
+   // override base class impl to avoid ELF parsing
+   public ClosestSymbol closestSymbolToPC() {
+      // try native lookup in debugger.
+      return dbg.lookup(dbg.getAddressValue(pc()));
+   }
+
+   public Address pc() {
+      return pc;
+   }
+
+   public Address localVariableBase() {
+      return ebp;
+   }
+
+   public CFrame sender() {
+      if (ebp == null) {
+        return null;
+      }
+
+      Address nextEBP = ebp.getAddressAt( 0 * ADDRESS_SIZE);
+      if (nextEBP == null) {
+        return null;
+      }
+      Address nextPC  = ebp.getAddressAt( 1 * ADDRESS_SIZE);
+      if (nextPC == null) {
+        return null;
+      }
+      return new LinuxMIPSCFrame(dbg, nextEBP, nextPC);
+   }
+
+   private static final int ADDRESS_SIZE = 4;
+   private Address pc;
+   private Address ebp;
+   private LinuxDebugger dbg;
+}
diff -r d0a60cd6d61c -r a7a1c6bde40a hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/linux/mips/LinuxMIPSThreadContext.java
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/linux/mips/LinuxMIPSThreadContext.java	Tue Nov 02 10:34:12 2010 +0800
@@ -0,0 +1,46 @@
+/*
+ * Copyright 2010 Lemote, Inc.  All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ *
+ */
+
+package sun.jvm.hotspot.debugger.linux.mips;
+
+import sun.jvm.hotspot.debugger.*;
+import sun.jvm.hotspot.debugger.mips.*;
+import sun.jvm.hotspot.debugger.linux.*;
+
+public class LinuxMIPSThreadContext extends MIPSThreadContext {
+  private LinuxDebugger debugger;
+
+  public LinuxMIPSThreadContext(LinuxDebugger debugger) {
+    super();
+    this.debugger = debugger;
+  }
+
+  public void setRegisterAsAddress(int index, Address value) {
+    setRegister(index, debugger.getAddressValue(value));
+  }
+
+  public Address getRegisterAsAddress(int index) {
+    return debugger.newAddress(getRegister(index));
+  }
+}
diff -r d0a60cd6d61c -r a7a1c6bde40a hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/mips/MIPSThreadContext.java
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/mips/MIPSThreadContext.java	Tue Nov 02 10:34:12 2010 +0800
@@ -0,0 +1,118 @@
+/*
+ * Copyright 2010 Lemote, Inc.  All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ *
+ */
+
+package sun.jvm.hotspot.debugger.mips;
+
+import sun.jvm.hotspot.debugger.*;
+
+/** Specifies the thread context on x86 platforms; only a sub-portion
+    of the context is guaranteed to be present on all operating
+    systems. */
+
+public abstract class MIPSThreadContext implements ThreadContext {
+  // Taken from /usr/include/ia32/sys/reg.h on Solaris/x86
+
+  // NOTE: the indices for the various registers must be maintained as
+  // listed across various operating systems. However, only a small
+  // subset of the registers' values are guaranteed to be present (and
+  // must be present for the SA's stack walking to work): EAX, EBX,
+  // ECX, EDX, ESI, EDI, EBP, ESP, and EIP.
+
+  public static final int ZERO = 0;
+  public static final int AT = 1;
+  public static final int V0 = 2;
+  public static final int V1 = 3;
+  public static final int A0 = 4;
+  public static final int A1 = 5;
+  public static final int A2 = 6;
+  public static final int A3 = 7;
+  public static final int T0 = 8;
+  public static final int T1 = 9;
+  public static final int T2 = 10;
+  public static final int T3 = 11;
+  public static final int T4 = 12;
+  public static final int T5 = 13;
+  public static final int T6 = 14;
+  public static final int T7 = 15;
+  public static final int S0 = 16;
+  public static final int S1 = 17;
+  public static final int S2 = 18;
+  public static final int S3 = 19;
+  public static final int S4 = 20;
+  public static final int S5 = 21;
+  public static final int S6 = 22;
+  public static final int S7 = 23;
+  public static final int T8 = 24;
+  public static final int T9 = 25;
+  public static final int K0 = 26;
+  public static final int K1 = 27;
+  public static final int GP = 28;
+  public static final int SP = 29;
+  public static final int FP = 30;
+  public static final int RA = 31;
+
+
+
+  private static final String[] regNames = {
+    "ZERO",		"AT",		"V0",		"V1",
+    "A0",    	"A1",   "A2",   "A3",
+    "T0",    	"T1",   "T2",   "T3",
+    "T4", 		"T5",   "T6",   "T7",
+    "S0", 		"S1",  	"S2",		"S3",
+    "S4",   	"S5",   "S6",   "S7",
+    "T8",    	"T9",		"K0",		"K1"
+    "GP",    	"SP",   "FP",   "RA"
+  };
+
+  // Ought to be int on x86 but we're stuck
+  private long[] data;
+
+  public MIPSThreadContext() {
+    data = new long[NPRGREG];
+  }
+
+  public int getNumRegisters() {
+    return NPRGREG;
+  }
+
+  public String getRegisterName(int index) {
+    return regNames[index];
+  }
+
+  public void setRegister(int index, long value) {
+    data[index] = value;
+  }
+
+  public long getRegister(int index) {
+    return data[index];
+  }
+
+  /** This can't be implemented in this class since we would have to
+      tie the implementation to, for example, the debugging system */
+  public abstract void setRegisterAsAddress(int index, Address value);
+
+  /** This can't be implemented in this class since we would have to
+      tie the implementation to, for example, the debugging system */
+  public abstract Address getRegisterAsAddress(int index);
+}
diff -r d0a60cd6d61c -r a7a1c6bde40a hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/proc/mips/ProcMIPSThread.java
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/proc/mips/ProcMIPSThread.java	Tue Nov 02 10:34:12 2010 +0800
@@ -0,0 +1,91 @@
+/*
+ * Copyright 2010 Lemote, Inc.  All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ *
+ */
+
+package sun.jvm.hotspot.debugger.proc.mips;
+
+import sun.jvm.hotspot.debugger.*;
+import sun.jvm.hotspot.debugger.mips.*;
+import sun.jvm.hotspot.debugger.proc.*;
+import sun.jvm.hotspot.utilities.*;
+
+public class ProcMIPSThread implements ThreadProxy {
+  private ProcDebugger debugger;
+  private int         id;
+
+  public ProcMIPSThread(ProcDebugger debugger, Address addr) {
+    this.debugger = debugger;
+
+    // FIXME: the size here should be configurable. However, making it
+    // so would produce a dependency on the "types" package from the
+    // debugger package, which is not desired.
+    this.id       = (int) addr.getCIntegerAt(0, 4, true);
+  }
+
+  public ProcMIPSThread(ProcDebugger debugger, long id) {
+    this.debugger = debugger;
+    this.id = (int) id;
+  }
+
+  public ThreadContext getContext() throws IllegalThreadStateException {
+    ProcMIPSThreadContext context = new ProcMIPSThreadContext(debugger);
+    long[] regs = debugger.getThreadIntegerRegisterSet(id);
+    /*
+       _NGREG in reg.h is defined to be 19. Because we have included
+       debug registers MIPSThreadContext.NPRGREG is 25.
+    */
+



More information about the distro-pkg-dev mailing list