projects
/
ardour.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Amp is the one place where we generate a per-sample vector for automation playback...
[ardour.git]
/
libs
/
pbd
/
pbd
/
stacktrace.h
diff --git
a/libs/pbd/pbd/stacktrace.h
b/libs/pbd/pbd/stacktrace.h
index 672ee2acad3a79e7d107c5d2e517d1aba89eb799..99fc9d5c574f742e400532f8fb8144928fee9b2c 100644
(file)
--- a/
libs/pbd/pbd/stacktrace.h
+++ b/
libs/pbd/pbd/stacktrace.h
@@
-1,5
+1,5
@@
/*
/*
- Copyright (C) 2000-2007 Paul Davis
+ Copyright (C) 2000-2007 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@
-38,12
+38,12
@@
namespace PBD {
namespace PBD {
+
LIBPBD_API void stacktrace (std::ostream& out, int levels = 0);
LIBPBD_API void trace_twb();
LIBPBD_API void stacktrace (std::ostream& out, int levels = 0);
LIBPBD_API void trace_twb();
-/* JE - !!!! Declaration might possibly get removed (except it's still used in 'libs/canvas/item.cc') */ std::string demangle (const std::string&);
template<typename T>
template<typename T>
-class /*LIBPBD_API*/ thing_with_backtrace
+class /*LIBPBD_API*/ thing_with_backtrace
{
public:
thing_with_backtrace () {
{
public:
thing_with_backtrace () {
@@
-51,7
+51,7
@@
class /*LIBPBD_API*/ thing_with_backtrace
#ifdef HAVE_EXECINFO
allocation_backtrace = new void*[50];
allocation_backtrace_size = backtrace (allocation_backtrace, 50);
#ifdef HAVE_EXECINFO
allocation_backtrace = new void*[50];
allocation_backtrace_size = backtrace (allocation_backtrace, 50);
-#else
+#else
allocation_backtrace_size = 0;
#endif
Glib::Threads::Mutex::Lock lm (all_mutex);
allocation_backtrace_size = 0;
#endif
Glib::Threads::Mutex::Lock lm (all_mutex);
@@
-63,14
+63,14
@@
class /*LIBPBD_API*/ thing_with_backtrace
#ifdef HAVE_EXECINFO
allocation_backtrace = new void*[50];
allocation_backtrace_size = backtrace (allocation_backtrace, 50);
#ifdef HAVE_EXECINFO
allocation_backtrace = new void*[50];
allocation_backtrace_size = backtrace (allocation_backtrace, 50);
-#else
+#else
allocation_backtrace_size = 0;
#endif
Glib::Threads::Mutex::Lock lm (all_mutex);
all.push_back (this);
}
allocation_backtrace_size = 0;
#endif
Glib::Threads::Mutex::Lock lm (all_mutex);
all.push_back (this);
}
- ~thing_with_backtrace() {
+ ~thing_with_backtrace() {
if (allocation_backtrace_size) {
delete [] allocation_backtrace;
}
if (allocation_backtrace_size) {
delete [] allocation_backtrace;
}
@@
-89,9
+89,9
@@
class /*LIBPBD_API*/ thing_with_backtrace
for (x = all.begin(); x != all.end(); ++x) {
char **strings;
size_t i;
for (x = all.begin(); x != all.end(); ++x) {
char **strings;
size_t i;
-
+
strings = backtrace_symbols ((*x)->allocation_backtrace, (*x)->allocation_backtrace_size);
strings = backtrace_symbols ((*x)->allocation_backtrace, (*x)->allocation_backtrace_size);
-
+
if (strings) {
stream << "--- ALLOCATED SHARED_PTR @ " << (*x) << std::endl;
for (i = 0; i < (*x)->allocation_backtrace_size && i < 50U; i++) {
if (strings) {
stream << "--- ALLOCATED SHARED_PTR @ " << (*x) << std::endl;
for (i = 0; i < (*x)->allocation_backtrace_size && i < 50U; i++) {
@@
-117,6
+117,4
@@
template<typename T> /*LIBPBD_API*/ Glib::Threads::Mutex PBD::thing_with_backtra
} // namespace PBD
} // namespace PBD
-// JE - !!!!#include "../pbd/stacktrace.impl"
-
#endif /* __libpbd_stacktrace_h__ */
#endif /* __libpbd_stacktrace_h__ */