hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/remote/RemoteDebugger.java
author xdono
Tue, 28 Jul 2009 12:12:40 -0700
changeset 3261 c7d5aae8d3f7
parent 2254 f13dda645a4b
child 5547 f4b087cbb361
permissions -rw-r--r--
6862919: Update copyright year Summary: Update copyright for files that have been modified in 2009, up to 07/09 Reviewed-by: tbell, ohair
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
     1
/*
3261
c7d5aae8d3f7 6862919: Update copyright year
xdono
parents: 2254
diff changeset
     2
 * Copyright 2002-2009 Sun Microsystems, Inc.  All Rights Reserved.
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
489c9b5090e2 Initial load
duke
parents:
diff changeset
     4
 *
489c9b5090e2 Initial load
duke
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
489c9b5090e2 Initial load
duke
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
489c9b5090e2 Initial load
duke
parents:
diff changeset
     7
 * published by the Free Software Foundation.
489c9b5090e2 Initial load
duke
parents:
diff changeset
     8
 *
489c9b5090e2 Initial load
duke
parents:
diff changeset
     9
 * This code is distributed in the hope that it will be useful, but WITHOUT
489c9b5090e2 Initial load
duke
parents:
diff changeset
    10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
489c9b5090e2 Initial load
duke
parents:
diff changeset
    11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
489c9b5090e2 Initial load
duke
parents:
diff changeset
    12
 * version 2 for more details (a copy is included in the LICENSE file that
489c9b5090e2 Initial load
duke
parents:
diff changeset
    13
 * accompanied this code).
489c9b5090e2 Initial load
duke
parents:
diff changeset
    14
 *
489c9b5090e2 Initial load
duke
parents:
diff changeset
    15
 * You should have received a copy of the GNU General Public License version
489c9b5090e2 Initial load
duke
parents:
diff changeset
    16
 * 2 along with this work; if not, write to the Free Software Foundation,
489c9b5090e2 Initial load
duke
parents:
diff changeset
    17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
489c9b5090e2 Initial load
duke
parents:
diff changeset
    18
 *
489c9b5090e2 Initial load
duke
parents:
diff changeset
    19
 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
489c9b5090e2 Initial load
duke
parents:
diff changeset
    20
 * CA 95054 USA or visit www.sun.com if you need additional information or
489c9b5090e2 Initial load
duke
parents:
diff changeset
    21
 * have any questions.
489c9b5090e2 Initial load
duke
parents:
diff changeset
    22
 *
489c9b5090e2 Initial load
duke
parents:
diff changeset
    23
 */
489c9b5090e2 Initial load
duke
parents:
diff changeset
    24
489c9b5090e2 Initial load
duke
parents:
diff changeset
    25
package sun.jvm.hotspot.debugger.remote;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    26
489c9b5090e2 Initial load
duke
parents:
diff changeset
    27
import java.rmi.*;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    28
489c9b5090e2 Initial load
duke
parents:
diff changeset
    29
import sun.jvm.hotspot.debugger.*;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    30
489c9b5090e2 Initial load
duke
parents:
diff changeset
    31
/** <P> This interface describes the methods which are used in a
489c9b5090e2 Initial load
duke
parents:
diff changeset
    32
    remote debugging scenario. It is only necessary because RMI
489c9b5090e2 Initial load
duke
parents:
diff changeset
    33
    requires that all such methods throw RemoteException, which is a
489c9b5090e2 Initial load
duke
parents:
diff changeset
    34
    checked (i.e., not a Runtime) exception. Since we already have a
489c9b5090e2 Initial load
duke
parents:
diff changeset
    35
    suitable runtime exception (DebuggerException) present in the
489c9b5090e2 Initial load
duke
parents:
diff changeset
    36
    signatures for all of the debugger-related methods, we would like
489c9b5090e2 Initial load
duke
parents:
diff changeset
    37
    to repurpose this to wrap RemoteExceptions. This is done by
489c9b5090e2 Initial load
duke
parents:
diff changeset
    38
    wrapping the actual remote debugger object
489c9b5090e2 Initial load
duke
parents:
diff changeset
    39
    </P>
489c9b5090e2 Initial load
duke
parents:
diff changeset
    40
489c9b5090e2 Initial load
duke
parents:
diff changeset
    41
    <P> NOTE that this interface currently assumes that the debugger
489c9b5090e2 Initial load
duke
parents:
diff changeset
    42
    on the remote machine has already been attached to the target
489c9b5090e2 Initial load
duke
parents:
diff changeset
    43
    process or has opened the desired core file. This implies that the
489c9b5090e2 Initial load
duke
parents:
diff changeset
    44
    machine hosting the user interface can not effect
489c9b5090e2 Initial load
duke
parents:
diff changeset
    45
    attaching/detaching. Currently this restriction has been enforced
489c9b5090e2 Initial load
duke
parents:
diff changeset
    46
    to make the user interface less confusing, but there will also be
489c9b5090e2 Initial load
duke
parents:
diff changeset
    47
    security concerns with allowing clients to attach to arbitrary
489c9b5090e2 Initial load
duke
parents:
diff changeset
    48
    remote processes. </P>
489c9b5090e2 Initial load
duke
parents:
diff changeset
    49
*/
489c9b5090e2 Initial load
duke
parents:
diff changeset
    50
489c9b5090e2 Initial load
duke
parents:
diff changeset
    51
public interface RemoteDebugger extends Remote {
489c9b5090e2 Initial load
duke
parents:
diff changeset
    52
  public String    getOS() throws RemoteException;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    53
  public String    getCPU() throws RemoteException;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    54
  public MachineDescription getMachineDescription() throws RemoteException;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    55
  public long      lookupInProcess(String objectName, String symbol) throws RemoteException;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    56
  public ReadResult readBytesFromProcess(long address, long numBytes) throws RemoteException;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    57
  public boolean   hasConsole() throws RemoteException;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    58
  public String    getConsolePrompt() throws RemoteException;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    59
  public String    consoleExecuteCommand(String cmd) throws RemoteException;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    60
  public long      getJBooleanSize() throws RemoteException;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    61
  public long      getJByteSize() throws RemoteException;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    62
  public long      getJCharSize() throws RemoteException;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    63
  public long      getJDoubleSize() throws RemoteException;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    64
  public long      getJFloatSize() throws RemoteException;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    65
  public long      getJIntSize() throws RemoteException;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    66
  public long      getJLongSize() throws RemoteException;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    67
  public long      getJShortSize() throws RemoteException;
360
21d113ecbf6a 6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents: 1
diff changeset
    68
  public long      getHeapOopSize() throws RemoteException;
2254
f13dda645a4b 6791178: Specialize for zero as the compressed oop vm heap base
kvn
parents: 670
diff changeset
    69
  public long      getNarrowOopBase() throws RemoteException;
f13dda645a4b 6791178: Specialize for zero as the compressed oop vm heap base
kvn
parents: 670
diff changeset
    70
  public int       getNarrowOopShift() throws RemoteException;
f13dda645a4b 6791178: Specialize for zero as the compressed oop vm heap base
kvn
parents: 670
diff changeset
    71
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    72
  public boolean   areThreadsEqual(long addrOrId1, boolean isAddress1,
489c9b5090e2 Initial load
duke
parents:
diff changeset
    73
                                   long addrOrId2, boolean isAddress2) throws RemoteException;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    74
  public int       getThreadHashCode(long addrOrId, boolean isAddress) throws RemoteException;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    75
  public long[]    getThreadIntegerRegisterSet(long addrOrId, boolean isAddress) throws RemoteException;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    76
}