Thanks a lot for the responses! Vicki Toby Reyelts <[EMAIL PROTECTED]> wrote:
Hi Vicki, 1) We should be careful with our terminology here. I'm talking about using putfield and putstatic to specifically check for modifications of _instance and static field members_ This will always catch a write to those fields as long as it's not through reflection - In fact, this is how JDO checks for dirty object. I don't see how aload is going to help you here - or anywhere. 2) Somebody has already detailed an approach and problems with reflection. 3) Sorry, no. God bless, -Toby Reyelts -----Original Message----- From: vicki kozel [mailto:[EMAIL PROTECTED] Sent: Friday, September 12, 2003 11:54 AM To: BCEL Users List Subject: RE: help required 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 [EMAIL PROTECTED] 415-668-6967 home 415-806-9093 cell --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software
