If you have GDB 7.4 or higher, there is a skip
command that lets you skip functions or entire files. Once you have marked a file or function for skipping, it will not go into it again. From the GDB Handbook - Skipping Functions and Files
skip [linespec] skip function [linespec] After running this command, the function named by linespec or the function containing the line named by linespec will be skipped over when stepping. skip file [filename] After running this command, any function whose source lives in filename will be skipped over when stepping.
source share