;;; -*- Mode:LISP; Package:LISP-INTERNALS; Base:10; Readtable:CL -*-



; This function will invoke the debugger with all of its arguments
; sitting around in the active registers.
; Proceeding from the debugger will make it return.
;
(defun error (a0 &optional a1 a2 a3 a4 a5 a6 a7 a8 a9 a10 a11 a12 a13 a14 a15)
  (nubus-stuff:cause-debugger-trap)
  (hw:nop)
  (hw:read-md)
  nil)

(defmacro tail-error (a0 &optional a1 a2 a3 a4 a5 a6 a7 a8 a9 a10 a11 a12 a13 a14 a15)
  "When a call is made to error in a tail position use this macro instead to save information."
  `(progn (li:error ,a0 ,a1 ,a2 ,a3 ,a4 ,a5 ,a6 ,a7 ,a8 ,a9 ,a10 ,a11 ,a12 ,a13 ,a14 ,a15)
	  nil))
