Dear All,

Is there a way to uniquely identify a local variable in BCEL?

For instance, in the example below both of the variables x2 and x3 have an index
equal to 2. So, we cannot rely on the index alone.

static void foo( )
{
        int x1= 0;
        if (x1 >= 0)
        {
                int x2 = 0;
        }

int x3 = 0;
}

I looked into using the scope (LocalVariableGen.getStart() and 
LocalVariableGen.getEnd()) in addition to the index, but there does not seem to
be a way to get this information from LocalVariableInstruction.

In a related (but less critical) matter, it seems that the scope information is
only accessible when I compile the target code with the ‘-g’ switch on.

Your help is really appreciated.

Wes





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

Reply via email to