/[cmucl]/src/hemlock/debug.lisp
ViewVC logotype

Diff of /src/hemlock/debug.lisp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.2 by chiles, Wed May 29 11:40:48 1991 UTC revision 1.3 by chiles, Thu Jun 13 15:05:31 1991 UTC
# Line 6  Line 6 
6  ;;; If you want to use this code or any part of CMU Common Lisp, please contact  ;;; If you want to use this code or any part of CMU Common Lisp, please contact
7  ;;; Scott Fahlman or slisp-group@cs.cmu.edu.  ;;; Scott Fahlman or slisp-group@cs.cmu.edu.
8  ;;;  ;;;
 #|  
9  (ext:file-comment  (ext:file-comment
10    "$Header$")    "$Header$")
 |#  
11  ;;;  ;;;
12  ;;; **********************************************************************  ;;; **********************************************************************
13  ;;;  ;;;
# Line 23  Line 21 
21    
22    
23    
24  ;;;; Commands for slave buffers.  ;;;; DEFINE-DEBUGGER-COMMAND.
25    
26  (defmacro define-debugger-command (name doc cmd &key uses-argument)  (defmacro define-debugger-command (name doc cmd &key uses-argument)
27    `(defcommand ,(concatenate 'simple-string "Debug " name) (p)    `(defcommand ,(concatenate 'simple-string "Debug " name) (p)
# Line 41  Line 39 
39                 cmd)))                 cmd)))
40         (wire:wire-force-output wire))))         (wire:wire-force-output wire))))
41    
42  ;;;  
43  ;;; Frame changing commands.  
44  ;;;  ;;;; Frame changing commands.
45    
46  (define-debugger-command "Up"  (define-debugger-command "Up"
47    "Moves the \"Current Eval Server\" up one debugger frame."    "Moves the \"Current Eval Server\" up one debugger frame."
# Line 67  Line 65 
65    :frame    :frame
66    :uses-argument t)    :uses-argument t)
67    
68  ;;;  
69  ;;; In and Out commands.  
70  ;;;  ;;;; In and Out commands.
71    
72  (define-debugger-command "Quit"  (define-debugger-command "Quit"
73    "In the \"Current Eval Server\", throws to top level out of the debugger."    "In the \"Current Eval Server\", throws to top level out of the debugger."
# Line 89  Line 87 
87    :restart    :restart
88    :uses-argument t)    :uses-argument t)
89    
90  ;;;  
91  ;;; Information commands.  
92  ;;;  ;;;; Information commands.
93    
94  (define-debugger-command "Help"  (define-debugger-command "Help"
95    "In the \"Current Eval Server\", prints the debugger's help text."    "In the \"Current Eval Server\", prints the debugger's help text."
# Line 121  Line 119 
119     current frame."     current frame."
120    :list-locals)    :list-locals)
121    
 ;;; This should probably take you to the source in the editor.  
 ;;; Maybe split the windows?  
 ;;;  
122  (define-debugger-command "Source"  (define-debugger-command "Source"
123    "In the \"Current Eval Server\", prints the source form for the debugger's    "In the \"Current Eval Server\", prints the source form for the debugger's
124     current frame."     current frame."
# Line 134  Line 129 
129     current frame with surrounding forms for context."     current frame with surrounding forms for context."
130    :vsource)    :vsource)
131    
 ;;; Okay, the :edit-source command in the debugger initiates a synchronous RPC  
 ;;; into the editor via the wire in *termina-io*, a typescript stream.  This  
 ;;; routine takes the necessary values, a file and source-path, and changes  
 ;;; the editor's state to edit that.  
 ;;;  
 ;;; This command has to wait on SERVE-EVENT until some special is set by the  
 ;;; RPC routine saying it is okay to return to the editor's top level.  
 ;;;  
 (defcommand "Debug Edit Source" (p)  
   "Give the \"Current Eval Server\"'s current debugger frame, place the user  
    at the location's source in the editor."  
   "Give the \"Current Eval Server\"'s current debugger frame, place the user  
    at the location's source in the editor."  
   (declare (ignore p))  
   (let* ((server-info (get-current-eval-server t))  
          (wire (server-info-wire server-info)))  
     (wire:remote wire  
       (ts-stream-accept-input  
        (ts-data-stream (server-info-slave-info server-info))  
        :edit-source))  
     (wire:wire-force-output wire))))  
132    
133    
134    ;;;; Source editing.
135    
136  ;;; Okay, the :edit-source command in the slave debugger initiates a  ;;; "Debug Edit Source" -- Command.
137  ;;; synchronous RPC into the editor via the wire in *termina-io*, a typescript  ;;;
138  ;;; stream.  This routine takes the necessary values, a file and source-path,  ;;; The :edit-source command in the slave debugger initiates a synchronous RPC
139  ;;; and changes the editor's state to edit that.  ;;; into the editor via the wire in *terminal-io*, a typescript stream.  This
140    ;;; routine takes the necessary values, a file and source-path, and changes the
141    ;;; editor's state to display that location.
142  ;;;  ;;;
143  ;;; This command has to wait on SERVE-EVENT until some special is set by the  ;;; This command has to wait on SERVE-EVENT until some special is set by the
144  ;;; RPC routine saying it is okay to return to the editor's top level.  ;;; RPC routine saying it is okay to return to the editor's top level.
# Line 292  Line 270 
270  (defun cannot-edit-source-location ()  (defun cannot-edit-source-location ()
271    (throw 'editor-top-level nil))    (throw 'editor-top-level nil))
272    
273  ;;;  #|
274  ;;; Miscellaneous commands.  (defcommand "Debug Breakpoint" (p)
275  ;;;    "This tries to set a breakpoint in the \"Current Eval Server\" at the
276       location designated by the current point.  If there is no known code
277       location at the point, then this moves the point to the closest location
278       before the point."
279      "This tries to set a breakpoint in the \"Current Eval Server\" at the
280       location designated by the current point.  If there is no known code
281       location at the point, then this moves the point to the closest location
282       before the point."
283      (declare (ignore p))
284      (with-mark ((m (current-point)))
285        (
286    |#
287    
288    ;;;; Miscellaneous commands.
289    
290  (define-debugger-command "Flush Errors"  (define-debugger-command "Flush Errors"
291    "In the \"Current Eval Server\", toggles whether the debugger ignores errors    "In the \"Current Eval Server\", toggles whether the debugger ignores errors

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

  ViewVC Help
Powered by ViewVC 1.1.5