Implementation of Project
Explore how to implement and debug a project using function pointer parameters in C++. Learn to compile, set breakpoints, disassemble functions, and inspect register contents with GDB. This lesson guides you step-by-step through examining assembly code and practicing commands to improve debugging skills in Linux x64 environment.
Function pointer parameters project
It is our final project and a summary of the project source code.
FunctionParameters
The source code of the FunctionParameters project is given below:
Arithmetic program
The source code of the arithmetic program is given below:
Commented disassembly
Here is the commented disassembly we get after compiling the project and loading it into GDB:
gcc FunctionParameters.cpp Arithmetic.cpp -o FunctionParameters
gdb ./FunctionParameters
After compiling and loading, we should see the following in the GDB container:
...