4

As you may know, in GDB with step(s) command you can step into a function. But s examine and step into the function's parameters at first. For example for the following function:

foo(bar(1));

stepping into foo, steps into bar and then into foo. Stepping into the parameters become annoying as soon as the parameters count become more and more. Is it possible to directly step into foo execution and skip stepping into its parameters using GDB?

I know I can set a breakpoint for foo :) I'm searching for other solutions.

s4eed
  • 7,173
  • 9
  • 67
  • 104

1 Answers1

-1

When dealing with some complex calls:

printf("%d %d\n", function(), next_function());

I "go to" with step to that line and then single step si into. It single steps into the first function called. Then you can finish to get out and si again into the next function.

KamilCuk
  • 120,984
  • 8
  • 59
  • 111
  • 2
    I don't understand how this is the solution, since that's basically what he tried, but didn't want to do: `Stepping into the parameters become annoying as soon as the parameters count become more and more` – ssbssa Dec 16 '20 at 11:22