Mastering Assembly Programming
上QQ阅读APP看书,第一时间看更新

A debugger

We are almost ready to begin the process of instruction set exploration; however, there is one more thing that we have not touched yet, as there was no need for it--a debugger. There is a relatively wide choice of debuggers out there and you, being a developer, have most likely worked with at least one of them. However, since we are interested in debugging programs written in the Assembly language, I would suggest one of the following:

  • IDA Pro (https://www.hex-rays.com/products/ida/index.shtml): Very convenient, but also very expensive. If you have it, good! If not, never mind, we have other options. Windows only.
  • OllyDbg (http://www.ollydbg.de/version2.html): Free debugger/disassembler. More than enough for what we need. Windows only. Unfortunately, the 64-bit version of this tool was never finished, meaning that you would not be able to use it with 64-bit examples.
  • HopperApp (https://www.hopperapp.com): Commercial, but very affordable disassembler with GDB frontend. macOS X and Linux.
  • GDB (GNU DeBugger): Freely available, works on Windows, Linux, mac OS X, and others. Although GDB is a command-line tool, it is quite easy to use. The only limitation is that the disassembler's output is in AT&T syntax.

You are free to choose either one of these or a debugger that is not mentioned on the list (and there are relatively many). There is only one important factor to consider while selecting a debugger--you should feel comfortable with it, as running your code in a debugger, seeing everything that happens in registers of a processor or in memory, would greatly enhance your experience while writing code in Assembly.