Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get rid of stepping into stl_vector.h using gdb "s" command?

Tags:

c++

stdvector

gdb

Subject.

Compiled: g++ -g -Wall -o program program.cpp

Running: gdb -tui program

Thank you,

Javier.

like image 246
Javier Hernández Avatar asked Mar 22 '23 11:03

Javier Hernández


1 Answers

If you have GDB 7.4 or greater, there's a skip command, which lets you skip functions or entire files. After you mark a file or function for skipping, it won't step into it again. From the GDB Manual -- Skipping Over 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.
like image 93
Ari Avatar answered Mar 30 '23 00:03

Ari