Reputation: 38899
I have these 3 file in my program:
Now, I am using GDB to debug and I know the basic commands like "break lineno." or "break methodname". But, how do I debug the methods written in sample1.cpp?
I tried: break "sample1.cpp:mymethod" but it did not work.
Upvotes: 1
Views: 3048
Reputation: 7448
try
break mymethod
As the function name in not ambiguous, it should work.
See. http://www.unknownroad.com/rtfm/gdbtut/gdbbreak.html#BCPPFUNC
Upvotes: 2
Reputation: 93476
If mymethod is a member of myclass:
break myclass::mymethod
There should be no need to specify the file.
Upvotes: 0