[Top] [All Lists]

Re: java disassembler/assembler

Subject: Re: java disassembler/assembler
From: "Daniel Reynaud"
Date: Sun, 23 Oct 2005 12:13:01 +0200

It's useful if a disassembler prints offet (pc) of every instruction.
It might be optional, but I'd prefer for eth default to be on.
I suggest:
  NNN: instruction
The assembler can treat numbers as labels.  It should print a warning if
the numeric label doesn't match the pc - bu only once per method.

yes, the disassembler prints the offset of each instruction as a Jasmin comment. I'll try to have Jasmin handle that smoothly.

It would be nice to have an option to print methods, classesm
and signatures in external (Java) syntax, rather than as signatures

ok, I added that to my to-do list. What about the <clinit> method ?

If you want to create a replacement for jcf-dump should have an
option to print out the constant pool, and to display constant
pool indexes when printing instructions etc.  This probably
shouldn't be the default (it no longer i in jcf-dump), and it's
not requiried that the assembler be able parse a priinted
contant pool, but that would be nice.

the disassembler prints the constant pool as Jasmin comments. It also prints the constant pool indexes as Jasmin comments and also "tries" to fetch their actual value in the constant pool.

You can have a look at the attached test.j file, it has been produced by the disassembler with the following command :
dejasmin --warmode --printoffsets --nolabels test.class > test.j

<Prev in Thread] Current Thread [Next in Thread>