[Mono-dev] Cecil.FlowAnalysis and exception handler blocks

Russell Morris russell at russellsprojects.com
Sun Jun 4 14:50:52 EDT 2006


Hi all,

I'd like to update the code in Cecil.FlowAnalysis.ControlFlow so that it 
can make sense of exception handling blocks.  Currently, the 
FlowGraphBuilder in here refuses to deal with functions that have 
exception handling blocks.

At first glance, I think that a new class would be introduced to 
represent the exception handling blocks themselves.  This new class 
would contain information about the type of exception handling block it 
represented (catch, fault, finally, or filter), and a pointer to one (or 
more for catch blocks) InstructionBlocks that served as the entry point 
to the handler(s).

Each InstructionBlock would also have a reference to a lookup table that 
could return a stack of exception handling block classes (mentioned 
above) for any given instruction in the function.  The stack would 
represent the exception handler blocks that could potentially be invoked 
if the given instruction threw an exception (a stack because exception 
handling blocks can be nested in one another).

I'm interested in knowing if anyone out there is currently working in 
this area of Cecil, and would have anything to add to this analysis.

Thanks,

Russ




More information about the Mono-devel-list mailing list