Open emesare opened 11 months ago
We could also inline the non-exceptional path like so:
I recommend taking into consideration whether or not there's debug data for the non-exceptional path's function before you inline anything. If there's debug data or a symbol that wasn't just auto-generated then you don't want to get rid of that.
Using our RTTI information we can identify and symbolize both the throw metadata and the attached catch routine. This should be done in two passes. First pass should symbolize the throw metadata and the second pass should rewrite callsite to illustrate the branching, possibly with an xref to the catch routine and for the non-catch routine we should just be able to make the throw function returnable.
The end result should look something like this, the throw is highlighted orange to illustrate it could jump to the catch routine instead of continuing. Not sure how "correct" this is.