Say I have a main.c
So I run "gdb main.c"
main.c calls/goes into a function in somefile.c
How do I set a breakpoint in somefile.c?
Say I have a main.c
So I run "gdb main.c"
main.c calls/goes into a function in somefile.c
How do I set a breakpoint in somefile.c?
Print this out and keep it near by whenever you need to use GDB: GDB Quick Reference card
Looks like you'd type: b [file:]line
ex. b somefile.c:31
Another quick question:
When you are in Putty, and the cursor is at the top of the window, you press UP and it does a Page Up.
Is there any way to scroll up line-by-line? (IE you press up, ONE line disappears at the bottom and ONE more line is visible at the top. Rather than 20 lines at a time). (Useful for when you want to keep looking at two different things in a file.)
Putty is just a telnet client.
Which editor are you using once you login? ex. vi, emacs...
I have a while loop that just randomly stops on one of the iterations (after a few hundred times). How can I set a breakpoint (or a watch point) for that time?
I set a breakpoint for the line number in the loop. Then set a watchpoint (watch variable="BLACK"). Then delete the breakpoint so it can keep running so I don't have go through all 500 loops. But inside the loop, a function is called, and once it goes to that function, the watchpoint is automatically deleted.
Any tips?