Blog post: 用Typescript实现JVM | 打杂日志
$ node --version
v14.16.1
$ npm i
$ npm link
$ ./test.sh
$ classviewer <path/to/.class>
- enable with
--debug
flag - commands
- print string
string stack <n>
: print string at stack #nstring statics <n>
: print string at static vars #n in current classstring <n>
: print string at local vars #n
- print class
class stack <n>
: print class at stack #nclass var <n>
: print class at ocal vars #n
- print fields
fields stack <n>
: print field at stack #nfields var <n>
: print field at local vars #n
- print const
const <n>
: print const {n} in current class' constant pool
- print statics
statics
: print static vars of current class
- step
<Return>
: next instructionstep over
: next instruction in current method
- breakpoint
bp <n>
: set breakpoint at pc #n in current frame
- continue
run
: resume running
- print string