Decompiler Design - Advanced Topics

 

Prev: Recovering Types


Advanced Topics

In the Beginner and in the Intermediate sections we have considered the basic algorithms that make up a standard decompiler.

In this Advanced section we re-examine some of the topics with a focus on decompiling real-world random programs.

Major problems not yet covered

In the Intermediate section we have considered how to decompile some basic sequences of isolated code, without considering some of the most difficult problems. Here we look at some of these problems. They are:

  • switch statements
  • indirect jumps
  • indirect calls
  • tail-call optimization
  • stack deallocation coalescing
  • passing parameters in registers
  • inlining
  • call-return optimizations
  • register uncoloring
  • alloca() and setjmp/longjmp
  • C++ constructs
  • other languages

We'll consider these problems and propose a solution, with the understanding that there may not be a solution or that some user intervention may be required, since not all of these can be solved in a purely automatic way.


Next: Switch Statements