Hi Here is the patch to add backtrace to _GLIBCXX_DEBUG mode. It is using the recently introduced _GLIBCXX_HAS_STACKTRACE. It is only WIP because for the moment I had to add: // { dg-options "-lstdc++_libbacktrace" } to avoid unresolved symbols. How should I handle this ? 1. Ask the user to define _GLIBCXX_DEBUG_STACKTRACE to get the backtrace and so also require to add this linker option. 2. Is it possible to add something in formatter.h to automagically link libstdc++_libbacktrace ? 3. Add symbols to libstdc++.so ? Output sample: /home/fdt/dev/gcc/build/x86_64-pc-linux-gnu/libstdc++-v3/include/debug/vector:264: In function:     void std::debug::vector<_Tp, _Allocator>::assign(_InputIterator,     _InputIterator) [with _InputIterator = const int*;     = void; _Tp = int; _Allocator =     std::allocator] Backtrace:     0x40284a void std::debug::vector >::assign(int const*, int const*) /home/fdt/dev/gcc/build/x86_64-pc-linux-gnu/libstdc++-v3/include/debug/vector:264     0x402bed void gnu_test::check_assign1 > >() /home/fdt/dev/gcc/git/libstdc++-v3/testsuite/util/debug/checks.h:111     0x40246c test01() /home/fdt/dev/gcc/git/libstdc++-v3/testsuite/23_containers/vector/debug/assign4_neg.cc:26     0x40246c main /home/fdt/dev/gcc/git/libstdc++-v3/testsuite/23_containers/vector/debug/assign4_neg.cc:31 Error: function requires a valid iterator range [first, last). Objects involved in the operation:     iterator "first" @ 0x7ffe09e62fd8 {       type = int const* (constant iterator);     }     iterator "last" @ 0x7ffe09e62fd0 {       type = int const* (constant iterator);     } XFAIL: 23_containers/vector/debug/assign4_neg.cc execution test François