disassemble_class_bytes.java 3.42 KB
*DISASSEMBLER* may now contain a function to return the disassembler command. · b6f545b1
If *DISASSEMBLER* contains a function it specifies the command string to use for the DISASSEMBLE primitive by taking an argument for the pathname containing the class bytes and returning the string of a command that will output a representation to standard output. We also change the default suffix of the temporary file to ".class". All of this now enables "javap" to be used as the dissambler with the following assignment (in "~/.abclrc" for example): (setf *disassembler* (lambda (p) (let ((class (make-pathname :name (pathname-name p))) (path (directory-namestring p))) (format nil "javap -c -l -verbose -classpath ~A ~A" path class)))) It might be nice in the future if ABCL had a default value of *DISASSEMBLER* that would actually probe the filesystem for the existence of the various disassmemblers for fallback strategies.