In debuggers, stepping into a function with arguments that involve function calls may step into the nested function calls, even if they are simple and uninteresting, such as those found in the C++ STL.
When GDB stops at the foo call, the step (s) command will step into std::vector::back and std::unique_ptr::operator*. While you can execute finish (fin) and execute s again, it's time-consuming and distracting, especially when dealing with complex argument expressions.
Fortunately, GDB provides the skip command to skip functions that match a regex or filenames that match a glob (GDB 7.12 feature). You can skip all demangled function names that start with std::.
The skip command's file matching behavior uses the fnmatch function with the FNM_FILE_NAME flag. This means the wildcard character (*) won't match slashes. So, skip -gfi /usr/* won't exclude /usr/include/c++/14.2.1/bits/stl_vector.h.
I proposed to drop the FNM_FILE_NAME flag. If this is accepted, I will be able to skip a project directory with 1 skip -gfi */include/llvm/ADT/*