anchor.diff:                          (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)))
  
positive.code: (in-package :sys.int)
  
  (defun fetch-thread-function-arguments (thread)
    (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)
  
negative.code:          (format t " rip: ~8,'0X~%" (sys.int::memref-unsigned-byte-64 (mezzano.supervisor:thread-state-rsp thread) 0))))
    (values))
  
  (defun trace-execution (function &key full-dump run-forever (print-instructions t) trace-call-mode (trim-stepper-noise t))
    (check-type function function)
    (let* ((next-stop-boundary 10000)
           (stopped nil)
           (terminal-io *terminal-io*)
           (standard-input *standard-input*)
           (standard-output *standard-output*)
           (error-output *error-output*)
           (trace-output *trace-output*)
           (debug-io *debug-io*)
           (query-io *query-io*)
           (thread (mezzano.supervisor:make-thread
                    (lambda ()
                      (let ((*terminal-io* terminal-io)
                            (*standard-input* standard-input)
                            (*standard-output* standard-output)
                            (*error-output* error-output)
                            (*trace-output* trace-output)
                            (*debug-io* debug-io)
                            (*query-io* query-io)
                            (*the-debugger* (lambda (condition)
                                              (declare (ignore condition))
                                              (throw 'mezzano.supervisor:terminate-thread nil))))
                        (loop
                           (when stopped
                             (return))
                           (mezzano.supervisor:thread-yield))
                        (funcall function)))
                    :name "Trace thread"))
           (instructions-stepped 0)
           (prev-fn nil)
           (disassembler-context (mezzano.disassemble:make-disassembler-context function))
           (in-single-step-wrapper nil)
           (single-step-wrapper-sp nil)
           (prestart trim-stepper-noise)
           (entry-sp nil)
           (fundamental-function (mezzano.disassemble::peel-function function)))
      (mezzano.supervisor::stop-thread thread)
  