Hi,
I use this :
.........
GOTO goto = new GOTO(null);
......................
InstructionHandle handle = il.append(goto);
........
InstructionHandle endIf = il.append( someInstruction );
goto.setTarget(endIf);
........................

use handles in "addExceptionHandler".
I believe it will return valid target after  "setTarget", but I never need
"getTarget" method.

----- Original Message -----
From: "Abel Wang" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, September 27, 2002 1:30 AM
Subject: getting target of BranchInstruction


> Hello BCel users,
>
> I'm trying to get the target instruction handle from the GOTO instruction
> off of a try catch block.  In Java, it looks something like this:
>
> try {
>     <Whatever1>
> }
> catch(Exception e) {
>
>     <Whatever2>
> }
>
> System.out.println("done");
>
> What I'm trying to do is given the GOTO instruction at the end of
> <whatever1>, i want to get an index to the instruction which begins the
> System.out.println("done") command.  I'm trying
> BranchInstruction.getTarget() but it always returns null.  What is the
> proper way for me to do this?
>
> Thanks,
>
> --Abel
>
>
> _________________________________________________________________
> Chat with friends online, try MSN Messenger: http://messenger.msn.com
>
>
> --
> To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>
>


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

Reply via email to