简体   繁体   中英

How to step into a function but not its parameters using GDB

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.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM