I'm not wild about the names, but I definitely agree with the sentiment. How to display the disassembly of the referenced anon (or just local!) function is a good question, though.
As a stopgap measure here is something I sometimes use:
(defun disassemble-code-object-functions (code-object &key ignore)
(let ((ep (sb-kernel:%code-entry-points code-object)))
(loop while ep
do (unless (member ep ignore) (format t "~%===~%~S~%===~%" (sb-kernel:%simple-fun-name ep)) (disassemble ep))
(setf ep (sb-kernel:%simple-fun-next ep)))))
Note that it doesn't really get the elsewhere segment right: the disassembly for (LAMBDA (X Y)) here includes the invalid arg-count traps for both the lambda and the main function. (Which, incidentally, is bad: since the arg count is in ECX in both cases -- like always -- there should be just one trap.)
I'm not wild about the names, but I definitely agree with the sentiment. How to display the disassembly of the referenced anon (or just local!) function is a good question, though.
As a stopgap measure here is something I sometimes use:
(defun disassemble- code-object- functions (code-object &key ignore) %code-entry- points code-object)))
(format t "~%===~%~S~%===~%" (sb-kernel: %simple- fun-name ep))
(disassemble ep)) %simple- fun-next ep)))))
(let ((ep (sb-kernel:
(loop while ep
do (unless (member ep ignore)
(setf ep (sb-kernel:
(defun disassemble- component (fun &key ignore) code-object- functions kernel: fun-code- header (sb-kernel:%fun-fun fun))
(sb-kernel: %fun-fun (fdefinition name)))
ignore) ))
(disassemble-
(sb-
:ignore (mapcar (lambda (name)
Note that it doesn't really get the elsewhere segment right: the disassembly for (LAMBDA (X Y)) here includes the invalid arg-count traps for both the lambda and the main function. (Which, incidentally, is bad: since the arg count is in ECX in both cases -- like always -- there should be just one trap.)