Disassemblers, debuggers, and decompilers – oh my!

It's always wise to review the differences between these terms before going any further, because believe it or not, these words are commonly used interchangeably:

  • A debugger is a tool for testing program execution. It can help an engineer identify where execution is breaking, for example, so allows us to debug the software. A debugger will make use of some sort of disassembler. 
  • A disassembler is a program that takes pure machine code as input and displays the assembly language representation of the underlying code.
  • A decompiler attempts to reverse the compilation process; that is, it attempts to reconstruct a binary in a high-level language, such as C. Lots of constructs in the programmer's original code are often lost, so decompilation is not an exact science.

As you work with debuggers throughout this book, you will see the assembly language representation of a given executable file, so disassembly is a necessary part of this process. An engineer who just needs to understand what's happening at the processor level only needs a disassembler, whereas an engineer trying to recover high-level functionality from a program will need a decompiler.

Now, let's start playing around with one of the best debuggers (in our opinion): GNU debugger (GDB).

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.143.228.40