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

Re: debugging tools in CLOS



At  5:38 PM 5/17/94 +1000, Qin Yang wrote:
>Does anyone know any tools for tracing generic functions and methods
>in CLOS?  Please give me your advice.

See the MCL reference manual for TRACE. Here's an example:

? (defmethod foo (x) x)
#<STANDARD-METHOD FOO (T)>
? (defmethod foo ((x integer)) (1+ x))
#<STANDARD-METHOD FOO (INTEGER)>
? (trace foo)
NIL
? (trace (:method foo (t)))
NIL
? (trace (:method foo (integer)))
NIL
? (foo 1)
 Calling (FOO 1)
  Calling ((:METHOD FOO (INTEGER)) 1)
  (:METHOD FOO (INTEGER)) returned 2
 FOO returned 2
2
? (foo 'foo)
 Calling (FOO FOO)
  Calling ((:METHOD FOO (T)) FOO)
  (:METHOD FOO (T)) returned FOO
 FOO returned FOO
FOO
?