[Checkers] Debugging An Annotation Processor

Daniel Wand daniel.wand at gmail.com
Thu Nov 13 09:53:14 EST 2008


Hi,

> Personally, I debug the checkers using Eclipse.  You should be able to  
> use your favorite debugger, once you set the main class to  
> 'com.sun.tools.javac.Main' and the bootclasspath to include jsr308  
> langtools (or the project langtools).

Thanks, I did not think about that. Works perfectly.

> 
> > I am currently facing a strange bug. After analysing a while loop and
> > returning the new Analysis (from visitWhileLoop) it mysteriously
> > disapears and is replaced with an earlier analysis.
> 
> Is this analysis an extension to Flow?  Can this be related to the  
> while loop statement never executing if the condition is false  
> initially?

It's my own implementation of Flow. I had to implement my own Flow,
because the one in Checkers does not compute until a fixpoint is
reached. 
I found the problem, it was caused by an assumption on TreeScanners
scan(Iterable ...) method which was wrong.

Thanks!

Daniel




More information about the checkers mailing list