Learning GDB

  • make sure compile with -g: gcc -g file.c -o output
  • gdb ./mysort
  • ctrl x a ---> open the visual window
  • gdb start <arg>
  • set break point by using $ break <line number>
  • s/step
  • p argv ==> check values
  • continue: keep going until the next break point
  • set follow-fork-mode child ----> to follow child process!!!

results matching ""

    No results matching ""