1 | * ABCL-INTROSPECT |
---|
2 | ** Introduction |
---|
3 | |
---|
4 | ABCL-INTROSPECT offers more extensive systems for inspecting the state |
---|
5 | of the implementation, most notably in integration with SLIME, where |
---|
6 | the back-trace mechanism is augmented to the point that local |
---|
7 | variables are inspectable. |
---|
8 | |
---|
9 | Version of SLIME 2.25 dramatically increases the utility of the |
---|
10 | available inspectors under ABCL. Unfortunately, this version of SLIME |
---|
11 | is unreleased, so please use something post |
---|
12 | <https://github.com/slime/slime/commit/6f06402595df0ec6b305fc5a13e18f48e8989c64>. |
---|
13 | |
---|
14 | ** CL:DISASSEMBLE |
---|
15 | |
---|
16 | ABCL-INTROSPECT also contains a number of ASDF systems which provide |
---|
17 | modules to install as implementations for the JVM code analysis |
---|
18 | provided by CL:DISASSEMBLE. |
---|
19 | |
---|
20 | #+TABLE: Currently available decompilers as ASDF systems |
---|
21 | |------------+--------------------------+-----------------------------------------------------------------------------| |
---|
22 | | ASDF | status | URI | |
---|
23 | |------------+--------------------------+-----------------------------------------------------------------------------| |
---|
24 | | objectweb | working | <http://asm.ow2.org> | |
---|
25 | | javap | working | <<https://docs.oracle.com/javase/7/docs/technotes/tools/windows/javap.html> | |
---|
26 | | cfr | working | <https://www.benf.org/other/cfr> | |
---|
27 | | jad | fails ABCL-BUILD/install | <http://www.javadecompilers.com/jad/> | |
---|
28 | | procyon | working | <https://bitbucket.org/mstrobel/procyon/wiki/Java%20Decompiler> | |
---|
29 | | fernflower | loading | <https://github.com/fesh0r/fernflower> | |
---|
30 | |
---|
31 | |
---|
32 | These systems may be used by first loading the appropiate ASDF |
---|
33 | definition then using the SYS:CHOOSE-DISASSEMBLER function to select |
---|
34 | the loaded system. Currently available disassemblers are contained in |
---|
35 | the SYS:*DISASSEMBLERS* variable. |
---|
36 | |
---|
37 | #+caption: Using the ~javap~ Tool to Disassemble a Function |
---|
38 | #+begin_src lisp |
---|
39 | (require :abcl-contrib) |
---|
40 | (asdf:load-system :javap) |
---|
41 | (sys:choose-disassembler :javap) |
---|
42 | (cl:disassemble #'cons) |
---|
43 | ; Classfile /var/folders/yb/xlwjwjfs3l73n3vrcjwqwqs40000gn/T/abcl3108750031103632433.class |
---|
44 | ; Last modified May 11, 2020; size 910 bytes |
---|
45 | ; MD5 checksum fec1c72a76ccbb35e17be8c2de9b315e |
---|
46 | ; Compiled from "Primitives.java" |
---|
47 | ; final class org.armedbear.lisp.Primitives$pf_cons extends org.armedbear.lisp.Primitive |
---|
48 | ; minor version: 0 |
---|
49 | ; major version: 52 |
---|
50 | ; flags: ACC_FINAL, ACC_SUPER |
---|
51 | ; Constant pool: |
---|
52 | ; #1 = Fieldref #24.#25 // org/armedbear/lisp/Symbol.CONS:Lorg/armedbear/lisp/Symbol; |
---|
53 | ; #2 = String #26 // object-1 object-2 |
---|
54 | ; #3 = Methodref #7.#27 // org/armedbear/lisp/Primitive."<init>":(Lorg/armedbear/lisp/Symbol;Ljava/lang/String;)V |
---|
55 | ; #4 = Class #28 // org/armedbear/lisp/Cons |
---|
56 | ; #5 = Methodref #4.#29 // org/armedbear/lisp/Cons."<init>":(Lorg/armedbear/lisp/LispObject;Lorg/armedbear/lisp/LispObject;)V |
---|
57 | ; #6 = Class #31 // org/armedbear/lisp/Primitives$pf_cons |
---|
58 | ; #7 = Class #32 // org/armedbear/lisp/Primitive |
---|
59 | ; #8 = Utf8 <init> |
---|
60 | ; #9 = Utf8 ()V |
---|
61 | ; #10 = Utf8 Code |
---|
62 | ; #11 = Utf8 LineNumberTable |
---|
63 | ; #12 = Utf8 LocalVariableTable |
---|
64 | ; #13 = Utf8 this |
---|
65 | ; #14 = Utf8 pf_cons |
---|
66 | ; #15 = Utf8 InnerClasses |
---|
67 | ; #16 = Utf8 Lorg/armedbear/lisp/Primitives$pf_cons; |
---|
68 | ; #17 = Utf8 execute |
---|
69 | ; #18 = Utf8 (Lorg/armedbear/lisp/LispObject;Lorg/armedbear/lisp/LispObject;)Lorg/armedbear/lisp/LispObject; |
---|
70 | ; #19 = Utf8 first |
---|
71 | ; #20 = Utf8 Lorg/armedbear/lisp/LispObject; |
---|
72 | ; #21 = Utf8 second |
---|
73 | ; #22 = Utf8 SourceFile |
---|
74 | ; #23 = Utf8 Primitives.java |
---|
75 | ; #24 = Class #33 // org/armedbear/lisp/Symbol |
---|
76 | ; #25 = NameAndType #34:#35 // CONS:Lorg/armedbear/lisp/Symbol; |
---|
77 | ; #26 = Utf8 object-1 object-2 |
---|
78 | ; #27 = NameAndType #8:#36 // "<init>":(Lorg/armedbear/lisp/Symbol;Ljava/lang/String;)V |
---|
79 | ; #28 = Utf8 org/armedbear/lisp/Cons |
---|
80 | ; #29 = NameAndType #8:#37 // "<init>":(Lorg/armedbear/lisp/LispObject;Lorg/armedbear/lisp/LispObject;)V |
---|
81 | ; #30 = Class #38 // org/armedbear/lisp/Primitives |
---|
82 | ; #31 = Utf8 org/armedbear/lisp/Primitives$pf_cons |
---|
83 | ; #32 = Utf8 org/armedbear/lisp/Primitive |
---|
84 | ; #33 = Utf8 org/armedbear/lisp/Symbol |
---|
85 | ; #34 = Utf8 CONS |
---|
86 | ; #35 = Utf8 Lorg/armedbear/lisp/Symbol; |
---|
87 | ; #36 = Utf8 (Lorg/armedbear/lisp/Symbol;Ljava/lang/String;)V |
---|
88 | ; #37 = Utf8 (Lorg/armedbear/lisp/LispObject;Lorg/armedbear/lisp/LispObject;)V |
---|
89 | ; #38 = Utf8 org/armedbear/lisp/Primitives |
---|
90 | ; { |
---|
91 | ; org.armedbear.lisp.Primitives$pf_cons(); |
---|
92 | ; descriptor: ()V |
---|
93 | ; flags: |
---|
94 | ; Code: |
---|
95 | ; stack=3, locals=1, args_size=1 |
---|
96 | ; 0: aload_0 |
---|
97 | ; 1: getstatic #1 // Field org/armedbear/lisp/Symbol.CONS:Lorg/armedbear/lisp/Symbol; |
---|
98 | ; 4: ldc #2 // String object-1 object-2 |
---|
99 | ; 6: invokespecial #3 // Method org/armedbear/lisp/Primitive."<init>":(Lorg/armedbear/lisp/Symbol;Ljava/lang/String;)V |
---|
100 | ; 9: return |
---|
101 | ; LineNumberTable: |
---|
102 | ; line 467: 0 |
---|
103 | ; line 468: 9 |
---|
104 | ; LocalVariableTable: |
---|
105 | ; Start Length Slot Name Signature |
---|
106 | ; 0 10 0 this Lorg/armedbear/lisp/Primitives$pf_cons; |
---|
107 | ; |
---|
108 | ; public org.armedbear.lisp.LispObject execute(org.armedbear.lisp.LispObject, org.armedbear.lisp.LispObject); |
---|
109 | ; descriptor: (Lorg/armedbear/lisp/LispObject;Lorg/armedbear/lisp/LispObject;)Lorg/armedbear/lisp/LispObject; |
---|
110 | ; flags: ACC_PUBLIC |
---|
111 | ; Code: |
---|
112 | ; stack=4, locals=3, args_size=3 |
---|
113 | ; 0: new #4 // class org/armedbear/lisp/Cons |
---|
114 | ; 3: dup |
---|
115 | ; 4: aload_1 |
---|
116 | ; 5: aload_2 |
---|
117 | ; 6: invokespecial #5 // Method org/armedbear/lisp/Cons."<init>":(Lorg/armedbear/lisp/LispObject;Lorg/armedbear/lisp/LispObject;)V |
---|
118 | ; 9: areturn |
---|
119 | ; LineNumberTable: |
---|
120 | ; line 474: 0 |
---|
121 | ; LocalVariableTable: |
---|
122 | ; Start Length Slot Name Signature |
---|
123 | ; 0 10 0 this Lorg/armedbear/lisp/Primitives$pf_cons; |
---|
124 | ; 0 10 1 first Lorg/armedbear/lisp/LispObject; |
---|
125 | ; 0 10 2 second Lorg/armedbear/lisp/LispObject; |
---|
126 | ; } |
---|
127 | ; SourceFile: "Primitives.java" |
---|
128 | #+end_src |
---|
129 | |
---|
130 | * Colophon |
---|
131 | |
---|
132 | #+caption: Metadata Colophon |
---|
133 | #+begin_src n3 |
---|
134 | <> dc:source <https://abcl.org/svn/trunk/abcl/contrib/abcl-introspect/README.org> ; |
---|
135 | dc:replaces <https://abcl.org/svn/trunk/abcl/contrib/abcl-introspect/README.markdown> ; |
---|
136 | dc:modified "<2020-05-12 Tue 10:21>" . |
---|
137 | #+end_src |
---|