anchor.diff:  (in-package :sys.int)
   
   (defun fetch-thread-function-arguments (thread)
  +  (when (not (mezzano.supervisor:thread-full-save-p thread))
  +    (format t "Thread not full save?~%")
  +    (return-from fetch-thread-function-arguments '(:thread-in-strange-state)))
     (let ((count (mezzano.supervisor:thread-state-rcx-value thread))
           (reg-vals (list (mezzano.supervisor:thread-state-r8-value thread)
                           (mezzano.supervisor:thread-state-r9-value thread)
  
positive.code:                        (when (and prev-fn
                                    (not (eql fn prev-fn)))
                           (cond ((eql rip (%object-ref-unsigned-byte-64 fn +function-entry-point+))
                                  (format t "Entered function ~S with arguments ~:A.~%"
                                          (or (function-name fn) fn)
                                          (mapcar #'print-safely-to-string
                                                  (fetch-thread-function-arguments thread))))
                                 (t
                                  (format t "Returning from function ~S to ~S with results ~:A.~%"
                                          (or (function-name prev-fn) prev-fn)
                                          (or (function-name fn) fn)
                                          (mapcar #'print-safely-to-string
                                                  (fetch-thread-return-values thread))))))
                         (when print-instructions
                           (when (not (eql fn (mezzano.disassemble:disassembler-context-function disassembler-context)))
                             (setf disassembler-context (mezzano.disassemble:make-disassembler-context fn)))
  
negative.code:                         (mezzano.supervisor:thread-state-r12-value thread)))
          (sp (mezzano.supervisor:thread-state-rsp thread))
          (stack-vals '()))
      (when (not (fixnump count))
        (format t "Count #x~S not a fixnum?~%" (mezzano.supervisor:thread-state-rcx thread))
        (return-from fetch-thread-function-arguments '(:thread-in-strange-state)))
      (dotimes (i (max 0 (- count 5)))
        (push (memref-t sp (1+ i)) stack-vals))
      (subseq (append reg-vals (reverse stack-vals))
              0 count)))
  
  (defun fetch-thread-return-values (thread)
    (when (not (mezzano.supervisor:thread-full-save-p thread))
      (format t "Thread not full save?~%")
      (return-from fetch-thread-return-values '(:thread-in-strange-state)))
    (let ((count (mezzano.supervisor:thread-state-rcx-value thread))
          (vals (list (mezzano.supervisor:thread-state-r12-value thread)
                      (mezzano.supervisor:thread-state-r11-value thread)
                      (mezzano.supervisor:thread-state-r10-value thread)
                      (mezzano.supervisor:thread-state-r9-value thread)
                      (mezzano.supervisor:thread-state-r8-value thread))))
      (when (not (fixnump count))
        (format t "Count #x~S not a fixnum?~%" (mezzano.supervisor:thread-state-rcx thread))
        (return-from fetch-thread-return-values '(:thread-in-strange-state)))
      (dotimes (i (max 0 (- count 5)))
        (push (%object-ref-t thread (+ mezzano.supervisor::+thread-mv-slots-start+ i)) vals))
      (subseq (reverse vals) 0 count)))
  