Re: locate branch position in the source line

"Dave Brosius" <[email protected]> Tue, 11 Jul 2006 22:44:57 -0400
Newsgroups gmane.comp.jakarta.bcel.user
Message-ID <005a01c6a55d$29e1c000$6401a8c0@MeBigFatGuy>
Locations are generated by the javac compiler and more specifically are 
defined in the java class file format.
See:
http://java.sun.com/docs/books/vmspec/2nd-edition/html/ClassFile.doc.html#22856

The current class file format only specifies line numbers not columns within 
lines, so BCEL can't help you there.
Your only choice is to build or use a decompiler, or at least the logic from 
one, and figure the section through that knowledge.

==dave
----- Original Message ----- 
From: "Lajos NĂŠmeth" <L.B.Ne'[email protected]>
To: <[email protected]>
Sent: Tuesday, July 11, 2006 9:15 AM
Subject: locate branch position in the source line


> Hi everyone,
>
>
>
> I'm developping a code coverage tool with BCEL, and I have problem with
> branches. I need to know which branch how many times have been executed,
> which is clear, but I'd like to mark only the corresponding part of the
> source line, not the whole.
>
> Is there any possibility with BCEL without manipulating the source code?
>
>
>
> Regards,
>
> Lajos
>
>