harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sian January <sianjanu...@googlemail.com>
Subject Re: How to get the 'CodeAttribute' in class file?
Date Tue, 19 Oct 2010 12:50:04 GMT
Hi Wang,

Unless you're actually working on the VM itself I would suggest using
some kind of bytecode manipulation utility such as ASM or BCEL.

Regards,

Sian



2010/10/13 Wang Di <wang_di@fudan.edu.cn>:
> Hi all:
>
>         We have add annotation(CodeAttribute) for a method into class file,
> and we can dump these information with javap. For instance,
>
>
>
> public static void main(java.lang.String[]);
>
>  Code:
>
>   Stack=2, Locals=2, Args_size=1
>
>   0:   new     #647; //class java/util/Properties
>
>   3:   dup
>
>   4:   invokespecial   #644; //Method java/util/Properties."<init>":()V
>
>   7:   astore_1
>
>   8:   aload_0
>
>   9:   aload_1
>
>   10:  invokestatic    #283; //Method
> spec/harness/CommandLineParser.parseArgs:([Ljava/lang/String;Ljava/util/Prop
> erties;)Z
>
>   13:  ifne    17
>
>   16:  return
>
>   17:  aload_1
>
>   18:  invokestatic    #176; //Method
> runBenchmarkSuite:(Ljava/util/Properties;)V
>
>   21:  return
>
>  CodeAttribute: length = 0x5
>
>   00 01 00 00 00
>
>
>
>         How can we get these info in Harmony VM? Is there some interface
> exited?
>
>
>
> Many thanks´╝ü
>
> =====================================
>
> Wang Di
>
> Fudan University        201203
> No.825 Zhangheng Road, Shanghai
>
>
>
>
>
>



-- 
Unless stated otherwise above:
IBM United Kingdom Limited - Registered in England and Wales with number 741598.
Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU

Mime
View raw message