24 #include "libpbd-config.h"
30 #include <glibmm/threads.h>
89 typename std::list<thing_with_backtrace<T>*>::iterator x;
90 for (x =
all.begin(); x !=
all.end(); ++x) {
94 strings = backtrace_symbols ((*x)->allocation_backtrace, (*x)->allocation_backtrace_size);
97 stream <<
"--- ALLOCATED SHARED_PTR @ " << (*x) << std::endl;
98 for (i = 0; i < (*x)->allocation_backtrace_size && i < 50U; i++) {
99 stream << strings[i] << std::endl;
105 stream <<
"execinfo not defined for this platform" << std::endl;
112 static std::list<thing_with_backtrace<T>* >
all;
thing_with_backtrace(const thing_with_backtrace< T > &other)
static Glib::Threads::Mutex all_mutex
static void peek_a_boo(std::ostream &stream)
int allocation_backtrace_size
static std::list< thing_with_backtrace< T > * > all
void ** allocation_backtrace
thing_with_backtrace< T > & operator=(const thing_with_backtrace< T > &other)
void stacktrace(std::ostream &out, int levels=0, size_t start_level=0)