[prev in list] [next in list] [prev in thread] [next in thread] 

List:       bcel-user
Subject:    JSR / RET
From:       "Jens Danker" <danker () rbg ! informatik ! tu-darmstadt ! de>
Date:       2003-04-21 10:32:27
[Download RAW message or body]

Hi, 

I have a problem with the JSR / RET combination. How have to look the code to store \
the return address pushed by the JSR instruction?

My NOT working code looks like this:

        // Return address type
        Type returnType = ReturnaddressType.NO_TARGET;

        // Create local variable
        LocalVariableGen lvRetPC = mg.addLocalVariable("RetPC", returnType, null, \
null);

        // Store jsr return program counter value and set valid from here
        InstructionHandle store = il.append(factory.createStore(returnType, \
lvRetPC.getIndex()));

        ...

        il.append(new RET(lvRetPC.getIndex()) ;
           

When running this code I got an exception which says that BCEL can't handle the \
store, because it don't know the return address type.

What's wrong?

Jens



---------------------------------------------------------------------
To unsubscribe, e-mail: bcel-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: bcel-user-help@jakarta.apache.org


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic