1

I would like to step into the function GDB is currently at, but not into the functions that are called to prepare the parameters for the call.

Is there a single command in gdb that steps over functions like initial_metadata_flags() and directly into SendInitialMetadata?

  void StartCallInternal() {
>   single_buf.SendInitialMetadata(&context_->send_initial_metadata_,
                                   context_->initial_metadata_flags());
  }

If there is, I did not see it mentioned here: https://sourceware.org/gdb/onlinedocs/gdb/Continuing-and-Stepping.html

My current workaround is to step, finish, step, finish, until I get to the primary function on that line. But would like something more direct.

There are similar questions asked about Python and Visual Studio, but I haven't found a good answer for gdb.

Greg C
  • 143
  • 6

1 Answers1

0

You can configure functions that you want to skip while stepping:

(gdb) help skip
Ignore a function while stepping.

Usage: skip [FUNCTION-NAME]
       skip [FILE-SPEC] [FUNCTION-SPEC]
If no arguments are given, ignore the current function.

FILE-SPEC is one of:
       -fi|-file FILE-NAME
       -gfi|-gfile GLOB-FILE-PATTERN
FUNCTION-SPEC is one of:
       -fu|-function FUNCTION-NAME
       -rfu|-rfunction FUNCTION-NAME-REGULAR-EXPRESSION
...
Employed Russian
  • 199,314
  • 34
  • 295
  • 362