mcandre
mcandre

Reputation: 24602

gdb: break vs run

Let's say I set a breakpoint with break my_func in gdb, then type run. gdb executes the code until it hits the breakpoint. But what happens when I hit run again?

Will gdb continue into the breakpoint code, or will it skip past the breakpoint, or will it restart the code from line 1?

Upvotes: 0

Views: 93

Answers (1)

Employed Russian
Employed Russian

Reputation: 213526

But what happens when I hit run again?

The program is restarted.

If you want to "step over the breakpoint" and continue execution, use continue command.

Upvotes: 2

Related Questions