Tools such as Objdump are great for getting a look at the code in an executable while it's not executing. However, if you'd like to actually observe an executable in execution and find out more about how it processes information as well as how its internal data structures are altered by its execution, you will need something called a debugger. One such tool is called the GNU Debugger (GDB). In this section, we will cover the basic usage of GDB, and you will also get to know some of the tasks it allows us to pull off during a binary's execution.
To start off with, let's load up a binary and run it in GDB using the following command:
For our current example, this command ...