How do I run GDB?

How do I run GDB?
Answer
How to Debug C Program using gdb in 6 Simple Steps
  1. Compile the C program with debugging option -g. Compile your C program with -g option.
  2. Launch gdb. Launch the C debugger (gdb) as shown below.
  3. Set up a break point inside C program.
  4. Execute the C program in gdb debugger.
  5. Printing the variable values inside gdb debugger.
  6. Continue, stepping over and in – gdb commands.
 

Tìm kiếm

Back
Top