gdb won't single step thru the function
I started using gdb and g++ yesterday for the first time. I have been programming in C++ for almost two months now, but on windows platform.
I am trying to debug a C++ program that contains a function with couple of nested loops in it. All I want is to run a single line at a time. I compiled my program with the -g option (g++ -g myprogram).
First, I am having a problem making a break point. gdb wouldn't take my line number. I can get around that by specifying the function name.
But then...when I 'run', and then 'step' it goes right through my function.
What am I doing wrong?
Thanks for help.
|