Choosing a debugging tool
Many debugging tools around come with the Integrated Development Environment (IDE) of the programing language. For instance, Visual Studio has a debugging tool for C, C++, C#, and Visual Basic. Alternatively, you may have heard about CodeBlock and Bloodshed Dev-C++, which have their own debugging tools as well. However, if you remember what we discussed in Chapter 1, Simplifying Your Network Programming in C++, we decided not to use an IDE because its heavy load will not load much resource to our computer. We need a tool that is lightweight to develop our network application.
Our choice of tool is the GNU Debugger (GDB). GDB is a powerful debugging tool based on a command-line tool; this means that we don't need the complex Graphic User Interface (GUI). In other words, all we need is a keyboard, not even a mouse, so the system becomes lightweight as well.
There are four main things that GDB can do to help us solve the code problem, which are as follows:
Running our...