I have read Tell gdb to skip standard files ,but it not work in libc++ header file like "memory".
Example:
// main.cc
#include <memory>
int main(){
std::unique_ptr<int> a = std::make_unique<int>(10);
return 0;
}
Compile with:
clang++ -g -stdlib=libc++ -std=c++14 main.cc
Then start gdb and skip the memory file:
(gdb) skip -file /usr/include/c++/v1/memory
After that,you can still step
into std::make_unique()
function, why is that? (I use gdb-8.3.1-release.)
2020.1.15:
I can confirm the path is correct,because I copy the path from gdb frame.
I also try add the below skip rules, still not work.(The first two rules work in libstdc++.)
skip -rfu std::.*
skip -rfu std::.*::.*
skip -gfu /usr/include/c++/v1/*
I have tried debug gdb-8.3.1 itself,and find that gdb return from gdb/infrun.c:6365
because in_solib_dynsym_resolve_code()
return 1
.while in the libc++
version of std::make_unique
gdb get into gdb/infrun.c:6569
and call into function_name_is_marked_for_skip()
.
function_name_is_marked_for_skip()
is the place gdb check skip rules.
So,it looks like a fresh gdb issue out of gdb bug list.