Re: Popping from operand stack

2008-11-18 Thread Pranav Kuber
thod on, > since in this case, the two parameters are on the top of the stack. > in the same way that parameters would be pushed. > > - Original Message - From: "Pranav Kuber" <[EMAIL PROTECTED]> > To: "BCEL Users List" > Sent: Monday, November 17, 2

Re: Popping from operand stack

2008-11-17 Thread Dave Brosius
Monday, November 17, 2008 7:09 PM Subject: Re: Popping from operand stack Thanks for the help. Actually, I want to completely replace the if instruction with my code. So at runtime, instead of calling the if instruction if_icmpeq, my code shall get executed. So I just need the values from t

Re: Popping from operand stack

2008-11-17 Thread Pranav Kuber
Thanks for the help. Actually, I want to completely replace the if instruction with my code. So at runtime, instead of calling the if instruction if_icmpeq, my code shall get executed. So I just need the values from the stack to make a method call passing these two values as arguments, thus, bypas

Re: Popping from operand stack

2008-11-17 Thread Paul Keeble
From: Pranav Kuber <[EMAIL PROTECTED]> To: bcel-user@jakarta.apache.org Sent: Monday, 17 November, 2008 23:21:55 Subject: Popping from operand stack Hi, I'm new to using BCEL and have a query. I'm trying to instrument all IF instructions. So I just need to find out a way where I cou

Re: Popping from operand stack

2008-11-17 Thread Arrin Daley
Hi Pranav Perhaps a better way might be to insert DUP (or some of the other DUP variants) after the iload? instructions so that you copy the contents of the stack then you are free to do what you like with these as long as you return the stack to the state it was in before your instrumentatio

Popping from operand stack

2008-11-17 Thread Pranav Kuber
Hi, I'm new to using BCEL and have a query. I'm trying to instrument all IF instructions. So I just need to find out a way where I could access the operand stack constants (iload_1 and iload_2). For example, - if I have some code in this format if(a!=b) do Something... else do something.