Friday, June 02, 2006

Debugging the Decompiler

One of the most useful features of the new GUI will be the ability to step through a decompilation and inspect the RTL at each step. To date I have implemented a Step button that allows the user to inspect a procedure before each major phase of the decompilation on that procedure. In the future, I intend to add more debugging points, perhaps even to the resolution of a single RTL change. I expect that some way for the user to specify the desired level of resolution will be required. Whether that is a bunch of menu options, or a spinner or even multiple Step buttons (step to next change, step to next analysis, step to next phase, step to next procedure, etc), I havn't decided.

The UI already has a course form of breakpoints. At the decoding phase you can specify which procedures you want to inspect, and the decompilation will run without stopping until it gets to one of those procedures. It would be sensible to allow the user to set a breakpoint on a particular line of the RTL and run the decompilation until that line is changed.

Mike has sent me a paper which defines the term "time travel debugging" where the user has not only the ability to step forward, but also the ability to step backwards. This is particularly useful in conjunction with breakpoints. If something has gone wrong you need only place a breakpoint on that something and then run backwards until the breakpoint fires, then you can see what broke. Implementing something similar in Boomerang is definitely possible, but it requires something like the current "memo" system to checkpoint the RTL at appropriate intervals.

No comments:

Post a Comment