user12411795
user12411795

Reputation:

gdb how to step until end of statement ("n" does not do it!)

in GDB with C++ on LINUX:

How to step until the end of the current statement? The n (next statement) command performs many steps and one never knows, if one already has reached the end of the current statement (or the beginning of the next). I'm not talking about curly braces. I'm talking about executing a single assignment.

Upvotes: 0

Views: 91

Answers (1)

Employed Russian
Employed Russian

Reputation: 213957

How to step until the end of the current statement?

There isn't an easy way to achieve this, so don't put multiple statements on a single line.

If there is a single statement on each line, then next command will do what you want.

Upvotes: 1

Related Questions