Thanks a lot for the response, Toby! It is very helpful. I hope you can answer these 
couple of question about your comments:
1) "you can look for the putfield and putstatic instructions"
Q. I was going to look for ALOAD instructions to spot where variables get loaded onto 
stack - you suggest "putfield" and "putstatic" instead of that ?
2)"but that won't catch any modifications that occur through reflection."
Q. So, is there any way at all to find instructions related to modification of 
variables through reflection?
3) Can you suggest some code examples or open source tools that do something similar 
to what my task is? - I am trying to modify classfile, but not at the run time.
 
Thanks a lot!
Vicki

[EMAIL PROTECTED] wrote:
First, you don't necessarily know what local variables are, unless the original 
compiler included the line number information in the class file. If it did, you 
could try to scan for store instructions.

Second, you can look for the putfield and putstatic instructions to see when 
instance and static variables are modified, but that won't catch any 
modifications that occur through reflection.

God bless,
-Toby Reyelts
> I also was working on a simple BCEL based tool that will allow me to track all 
> variables, global and LOCAL, at the moment when they are changed. I just want to 
> insert instructions into the Method of profiled class to printout name and the 
> value of a variable - local variables too! - when they are changed. Any 
> suggestions??
> thanks!!
> Vicki

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[EMAIL PROTECTED]
415-668-6967 home
415-806-9093 cell

---------------------------------
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software

Reply via email to