24 #include "libpbd-config.h"
30 #include <glibmm/threads.h>
91 typename std::list<thing_with_backtrace<T>*>::iterator x;
92 for (x =
all.begin(); x !=
all.end(); ++x) {
96 strings = backtrace_symbols ((*x)->allocation_backtrace, (*x)->allocation_backtrace_size);
99 stream <<
"--- ALLOCATED SHARED_PTR @ " << (*x) << std::endl;
100 for (i = 0; i < (*x)->allocation_backtrace_size && i < 50U; i++) {
101 stream << strings[i] << std::endl;
107 stream <<
"execinfo not defined for this platform" << std::endl;
114 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)
void libpbd_c_stacktrace(int levels)