You are viewing a plain text version of this content. The canonical link for it is here.
Posted to bcel-user@jakarta.apache.org by Lajos Németh <L....@kent.ac.uk> on 2006/07/11 15:15:06 UTC

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


Re: locate branch position in the source line

Posted by Dave Brosius <db...@apache.org>.
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....@kent.ac.uk>
To: <bc...@jakarta.apache.org>
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
>
> 


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