0

I want gdb to dump the code it executes line by line. Just like step command as it shows the current line but I do not want do step through the entire code as it is too big.

So I want to automate it.

The reason I want to do this because my code behaves differently in two scenarios and I want to see where actually the diff arises so I plan to take dump for two different scenarios in two different file then take a diff.

I know it may not be the best way to debug something but trust me I have tried a lots of stuff to find the bug but no use and I think this can help me in a great way.

Thanks in advance !!

fduff
  • 3,461
  • 2
  • 28
  • 35
nav_jan
  • 2,403
  • 4
  • 21
  • 41

1 Answers1

0

With GDB you can set breakpoints that will allow you to follow step by step the code in a specific area of your programm.

C404
  • 243
  • 3
  • 14