Disassembling a method
Is there an easy way that I'm missing to disassemble a specific
method? I can go from the generic function to the specific method and
its associated functional object via the MOP and/or the inspector and
disassemble it (see below), but I'm looking for a direct invocation.
"Disassemble Definition" in the IDE seem to work only for plain
functions and I wouldn't know what to hand over to the CL:DISASSEMBLE
function to do this in one step. Any ideas?
Thanks,
Edi.
CL-USER 1 > (defmethod foo ((a integer))
(1+ a))
#<STANDARD-METHOD FOO NIL (INTEGER) 221AFAC7>
CL-USER 2 > (disassemble (method-function (first (generic-function-methods #'foo))))
221713EA:
0: 55 push ebp
1: 89E5 move ebp, esp
3: A803 testb al, 3
5: 750C jne L1
7: 89C7 move edi, eax
9: 83C704 add edi, 4
12: 7005 jo L1
14: FD std
15: 89F8 move eax, edi
17: C9 leave
18: C3 ret
L1: 19: C9 leave
20: E977ECF9FD jmp 2011007A ; #<Function SYSTEM::*%1+$ANY-STUB 2011007A>
25: 90 nop
NIL