[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Problems with 7debug in 7.2

Yes, there are additional errors in 7debug, because two functions are no
longer around in 7.2.  

We investigated them, and the following code gets around some of the 
problems.  Seems that in 7.2 they have set up the debugger to handle
various languages (not only Lisp!).  Therefore, you have to call
slightly different functions (as you can see below).  Just use these
patches to the debugger instead of the old ones.

Frankly, the code was too dense to completely debug, especially
considering the fact that I never use the features of the debugger
(showing source code, or diassembled code) that the bugs
pertain to.


As for having a clos for 7.1 and 7.2, it is possible.  You have to
get the minor version and load different files accordingly.  There
are a few other details, and if you want them, contact me, and I
will try to recreate what we did here at MITRE.  

However, I think you would really rather invest the time converting
all of your systems to 7.2.  It was a relatively painless process
and we have about 4 or 5 major systems.

**** code to make things "better"

; From buffer debugger.lisp >rel-7>debugger BD: (552)
  "-*- Mode: LISP; Package: Debugger; Base: 8; Lowercase: Yes -*-")

(defun show-all-compiled (&optional show-source-file-p)
  (let* ((*printing-monitor-message* t)
	 (frame *current-frame*)
	 (function (frame-function frame)))
    (format t "~V~S~" *emphasis-character-style* (function-name-for-debugger
    (when show-source-file-p
      (print-function-source-file function))
    (format t "~2%")
    ;; Print the arguments, including the rest-arg which is a local
    (let ((local-start (print-frame-args *current-frame* 1 t)))
      (cond ((frame-active-p *current-frame*)
	     ;; Print the rest of the locals, if the frame is active
	     (print-frame-locals *current-frame* local-start 1)
	     (format t "~%~VDisassembled code:~" *deemphasis-character-style*)
	     ;; YIKES!! I can't believe I did this!  PAUL 6/8/88
	     ;; (show-all-compiled-1 frame function) was the old call here.
	     ;; now, in 7.2 the debugger has been COMPLETELY rewritten using methods
and whatnot.
	     ;; this is apparently because of the support other languages and the new
window debugger, etc...
	     ;; lframe-show-code-for-function is what the REAL debugger calls here, so
I just threw it in.
	     (lframe-show-code-for-function *current-language* frame function
					    (lframe-show-source-code-p *current-language*)
					    :brief nil)
	     ;; This kludge is to prevent the prompt from triggering a **MORE**
	     ;; when it comes out on the bottom line of the window
	     (if (memq :notice (send standard-output :which-operations))
		 (send standard-output :notice :input-wait)))))))

; From buffer debugger.lisp >rel-7>debugger BD: (552)
  "-*- Mode: LISP; Package: Debugger; Base: 8; Lowercase: Yes -*-")

(cp:define-command (com-show-source-code :command-table "Global"
					 :provide-output-destination-keyword nil
					 (&optional (function nil function-supplied-p)))
    ((function '((sys:function-spec :defined-p t) :partial-completers nil)
	       :default (if (variable-boundp *current-frame*)
			    (function-name-for-debugger *current-frame*)
   (let* ((function (if function-supplied-p
			function (function-name-for-debugger *current-frame*)))
	  (frame (if function-supplied-p nil *current-frame*))
	  ;; YIKES AGAIN!! As before, the debugger has been changed substantially,
	  ;; so the call to (show-frame-source frame function) that was here no longer
	  ;; I stole the code below from the rel-7 debugger source.  Hope it is
correct.  PAUL 6/8/88. 
	  (language (if frame
			(find-language-for-frame frame)
			(find-language-for-function function))))
     ;;; Rich: instead of passing on function, you could pass a nil. You get
different (maybe better) behavior.
     (lframe-show-code-for-function language frame function t t t)))