Logo Search packages:      
Sourcecode: xemacs21-packages version File versions

Protocol.java

package jde.debugger;

/**
 * Protocol.java
 * <p>
 * Repository of all commands sent from jde to jdebug, and all lisp functions
 * sent from jdebug to jde
 * <p>
 *
 * <b>Nomenclature:</b>
 * 
 * <dt> jdebug: </dt>
 * <dd> The java side of the debugger </dd>
 *
 * <dt> jde: </dt>
 * <dd> The emacs side of the debugger. Also used in general terms to
 *      mean JDE itself. </dd>
 *
 * <dt> JDE: </dt>
 * <dd> The java development environment </dd>
 *
 * <dt> debugger: </dt>
 * <dd> Usually the java side, also used in general
 *      terms to mean the full debugging framework </dd>
 *
 * <dt> debugee: </dt>
 * <dd> The application being debugged. Usually means
 *      the VM of the application, as against the VM
 *      of the debugger. </dd>
 *
 * <dt> application: </dt>
 * <dd> Same as 'debugee' </dd>
 *
 * <dt> VM: </dt>
 * <dd> The java virtual machine. During debugging,
 *      the debugger VM connects to the debuggee VM
 *      through a socket/shared memory (the latter is
 *      possible in case of Win9x/NT)
 * <p>
 *
 *
 * <b> Commands </b>
 * <p>
 * The commands will be ASCII strings delimited by spaces, and
 * will end with a  BR .
 * <pre>
 *      debugee_vm_id command_id command [optional_args]
 * </pre>
 *
 * <dt> debugee_vm_id </dt>
 * <dd> a number that is assigned during handshake
 *      between the emacs and the jde sides,
 *      representing a specific debugee vm.
 *      <p>
 *      if (id == -1), the command is not specific to
 *      any debugee vm.
 *      <p>
 *      'app_id', 'vm_id' 'id' & 'debugee_vm_id' are
 *      synonymous. </dd>
 *
 * <dt> command_id </dt>
 * <dd> an id that helps match a command and its response.
 *      <p>
 *      'cmd_id' 'cid' & 'command_id' are synonymous. </dd>
 *
 * <dt> command </dt>
 * <dd> plain text command </dd>
 *
 * <dt> optional_args </dt>
 * <dd> arguments for the command. can use "" for
 *      arguments with white spaces. </dd>
 * <p>
 *
 *
 * <b> Replies </b>
 * <p>
 * The replies to these commands will be ASCII too, in lisp
 * forms, and will also end with a  BR . They will either by
 * "result" or "error":
 * <pre>
 *      (jde-dbo-command-result command_id [optional_args])
 *      (jde-dbo-command-error command_id reason)
 * </pre>
 *
 * <dt> debugee_vm_id, command_id </dt>
 * <dd> as above </dd>
 *
 * <dt> optional_args </dt>
 * <dd> if required </dd>
 * 
 * <dt> reason </dt>
 * <dd> a string, containing the error message </dd>
 * <p>
 *
 *
 * <b> Event Sets </b>
 * See {@link EventHandler here}
 * <p>
 *
 * <p>
 * Created: Thu Jul  8 13:44:10 1999
 * 
 * @author Amit Kumar
 * @since 0.1
 */

00108 public interface Protocol  {

    /*
     *
     * Some useful constants
     *
     */

    /** line break, platform dependent */
00117     public static String BR = System.getProperty("line.separator");


    /*
     *
     * Supported Commands from jde to jdebug
     *
     */

    
    /*
     * Specifying the debuggee application
     */

    /** @see jde.debugger.command.LaunchApplication */
00132     public final static String LAUNCH = "launch";
    
    /** @see jde.debugger.command.AttachSocket */
00135     public final static String ATTACH_SOCKET = "attach_socket";

    /** @see jde.debugger.command.AttachShmem */
00138     public final static String ATTACH_SHMEM = "attach_shmem";
    
    /** @see jde.debugger.command.ListenSocket */
00141     public final static String LISTEN_SOCKET = "listen_socket";

    /** @see jde.debugger.command.ListenShmem */
00144     public final static String LISTEN_SHMEM = "listen_shmem";

    /*
     * Others
     */
    
    /** @see jde.debugger.command.Quit */
00151     public final static String QUIT = "quit";
    /** @see jde.debugger.command.Quit */
00153     public final static String EXIT = "exit";

    /*
     * Following commands are application specific: ie are directed
     * towards an application once it has been launched/attached to/ etc.
     */

    /** @see jde.debugger.command.Run */
00161     public final static String RUN = "run";

    /** @see GeneralCommands#doFinish(Integer, List) */
00164     public final static String FINISH = "finish";

    /** @see GeneralCommands#doTraceClasses(Integer, List) */
00167     public final static String TRACE_CLASSES = "trace_classes";
    /** @see GeneralCommands#doCancelTraceClasses(Integer, List) */
00169     public final static String CANCEL_TRACE_CLASSES = "cancel_trace_classes";


    /** @see SpecCommands#doTraceExceptions(Integer, List) */
00173     public final static String TRACE_EXCEPTIONS = "trace_exceptions";
    /** @see SpecCommands#doWatch(Integer, List) */
00175     public final static String WATCH = "watch";
    /** @see SpecCommands#doBreak(Integer, List) */
00177     public final static String BREAK = "break";
    /** @see SpecCommands#doClear(Integer, List) */
00179     public final static String CLEAR = "clear";

    /** @see jde.debugger.command.Step */
00182     public final static String STEP = "step";

    /** @see ThreadCommands#doSuspend(Integer, List) */
00185     public final static String SUSPEND = "suspend";
    /** @see ThreadCommands#doResume(Integer, List) */
00187     public final static String RESUME = "resume";
    /** @see ThreadCommands#doInterrupt(Integer, List) */
00189     public final static String INTERRUPT = "interrupt";
    /** @see ThreadCommands#doKillThread(Integer, List) */
00191     public final static String KILL_THREAD = "kill_thread";

    /** @see ThreadCommands#doGetThreads(Integer, List) */
00194     public final static String GET_THREADS = "get_threads";
    /** @see ThreadCommands#doGetThread(Integer, List) */
00196     public final static String GET_THREAD = "get_thread";
    /** @see ThreadCommands#doGetObjectMonitors(Integer, List) */
00198     public final static String GET_OBJECT_MONITORS = "get_object_monitors";
    /** @see ThreadCommands#doTraceThreads(Integer, List) */
00200     public final static String TRACE_THREADS = "trace_threads";
    /** @see ThreadCommands#doCancelTraceThreads(Integer, List) */
00202     public final static String CANCEL_TRACE_THREADS = "cancel_trace_threads";

    /** @see GeneralCommands#doTraceMethods(Integer, List) */
00205     public final static String TRACE_METHODS = "trace_methods";
    /** @see GeneralCommands#doCancelTraceMethods(Integer, List) */
00207     public final static String CANCEL_TRACE_METHODS = "cancel_trace_methods";
    
    /** @see GeneralCommands#doGetObject(Integer, List) */
00210     public final static String GET_OBJECT = "get_object";

  /** @see jde.debugger.command.GetArray */
00213   public final static String GET_ARRAY = "get_array";

    /** @see jde.debugger.command.GetString */
00216     public final static String GET_STRING = "get_string";

    /** @see jde.debugger.command.GetLocals */
00219     public final static String GET_LOCALS = "get_locals";

    /** @see GeneralCommands#doGetLoadedClasses(Integer, List) */
00222     public final static String GET_LOADED_CLASSES = "get_loaded_classes";
    /** @see GeneralCommands#doGetPathInformation(Integer, List) */
00224     public final static String GET_PATH_INFORMATION = "get_path_information";

    /** @see jde.debugger.command.EvaluateExpression */
00227     public final static String EVALUATE = "evaluate";


    /*
     *
     * Commands end
     *
     */




    

    // lisp functions sent from jdebug to jde

    /** arbitrary lisp functions passed to jde start with this*/
00244     public final static String JDE_BUG =
      "jde-dbo-";

    /** the very first function, indicating that jdebug is up and running */
00248     public final static String JDE_INIT_DEBUG_SESSION =
      JDE_BUG+"init-debug-session";

    /** The command executed properly, returns the result */
00252     public final static String COMMAND_RESULT =
      JDE_BUG+"command-result";
    /** There was an error executing the command, returns the error */
00255     public final static String COMMAND_ERROR =
      JDE_BUG+"command-error";

    /** A message to be displayed on the JDE UI */
00259     public final static String MESSAGE =
      "message";
    /** A warning */
00262     public final static String WARNING =
      "warning";
    /** an error */
00265     public final static String ERROR =
      "error";

    /** a debug message */
00269     public final static String DEBUG =
      "debug";

    /** Event sets caused by the jpda. */
00273     public final static String EVENTSET =
      "event-set";

    /** used to construct messages about invalid breakpoints etc. */
00277     public final static String INVALID =
      "invalid-";

    /**
     * tell jdebug to inform jdebug about references to objects being
     * currently used. might dissapear soon...
     */
00284     public final static String REPORT_IDS_IN_USE =
      "report-ids-in-use";

    /**
     * Notifies that a connection to a vm was successfully made
     */
00290     public final static String CONNECTED_TO_VM =
      "connected-to-vm";

    /**
     * Notifies that a spec was resolved properly
     */
00296     public final static String SPEC_RESOLVED =
      "spec-resolved";


    /*
     *
     * Events that are raised by the JDI implementation
     *
     */
     

    /** @see EventHandler#breakpointEvent(BreakpointEvent) */
00308     public final static String EVENT_BREAKPOINT_HIT =
      JDE_BUG+"breakpoint-hit-event";
    /** @see EventHandler#stepEvent(StepEvent) */
00311     public final static String EVENT_STEP_COMPLETED =
      JDE_BUG+"step-event";

    /** @see EventHandler#watchpointEvent(WatchpointEvent) */
00315     public final static String EVENT_WATCHPOINT_HIT =
      JDE_BUG+"watchpoint-hit-event";

    /** @see EventHandler#classPrepareEvent(ClassPrepareEvent) */
00319     public final static String EVENT_CLASS_PREPARE =
      JDE_BUG+"class-prepare-event";
    /** @see EventHandler#classUnloadEvent(ClassUnloadEvent) */
00322     public final static String EVENT_CLASS_UNLOAD =
      JDE_BUG+"class-unload-event";

    /** @see EventHandler#exceptionEvent(ExceptionEvent) */
00326     public final static String EVENT_EXCEPTION =
      JDE_BUG+"exception-event";

    /** @see EventHandler#threadStartEvent(ThreadStartEvent) */
00330     public final static String EVENT_THREAD_START =
      JDE_BUG+"thread-start-event";
    /** @see EventHandler#threadDeathEvent(ThreadDeathEvent) */
00333     public final static String EVENT_THREAD_DEATH =
      JDE_BUG+"thread-death-event";

    /** @see EventHandler#methodEntryEvent(MethodEntryEvent) */
00337     public final static String EVENT_METHOD_ENTRY =
      JDE_BUG+"method-entry-event";
    /** @see EventHandler#methodExitEvent(MethodExitEvent) */
00340     public final static String EVENT_METHOD_EXIT =
      JDE_BUG+"method-exit-event";

    /** @see EventHandler#vmStartEvent(Event) */
00344     public final static String EVENT_VM_START =
      JDE_BUG+"vm-start-event";
    /** @see EventHandler#vmDeathEvent(Event) */
00347     public final static String EVENT_VM_DEATH =
      JDE_BUG+"vm-death-event";
    /** @see EventHandler#vmDisconnectEvent(Event) */
00350     public final static String EVENT_VM_DISCONNECT =
      JDE_BUG+"vm-disconnected-event";

    /** @see EventHandler#otherEvent(Event) */
00354     public final static String EVENT_OTHER =
      JDE_BUG+"event-other";

    /*
     *
     * Events end
     *
     */

} // Protocol

Generated by  Doxygen 1.6.0   Back to index