[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: debugging tools in CLOS
- To: Qin Yang <qyang@socs.uts.EDU.AU>, info-mcl@cambridge.apple.com
- Subject: Re: debugging tools in CLOS
- From: bill@cambridge.apple.com (Bill St. Clair)
- Date: Tue, 24 May 1994 12:17:55 -0500
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
?