summaryrefslogtreecommitdiff
path: root/libs/pbd/stacktrace.cc
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2006-10-21 19:01:50 +0000
committerDavid Robillard <d@drobilla.net>2006-10-21 19:01:50 +0000
commitfedf3d34f32264ac57c6a222b678dc90f2bb1a88 (patch)
treee816c676d12ccc32b7e666792b9a01ab5b5a0367 /libs/pbd/stacktrace.cc
parent7bd41538d951c3e476655df741adfbebbb990bde (diff)
Merged with trunk R992.
Completely untested other than it compiles, runs, and records somewhat (need to merge again). git-svn-id: svn://localhost/ardour2/branches/midi@999 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/pbd/stacktrace.cc')
-rw-r--r--libs/pbd/stacktrace.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/libs/pbd/stacktrace.cc b/libs/pbd/stacktrace.cc
index 1e7dfa08e9..a653fe3033 100644
--- a/libs/pbd/stacktrace.cc
+++ b/libs/pbd/stacktrace.cc
@@ -9,7 +9,7 @@
#include <stdlib.h>
void
-PBD::stacktrace (std::ostream& out)
+PBD::stacktrace (std::ostream& out, int levels)
{
void *array[200];
size_t size;
@@ -23,7 +23,7 @@ PBD::stacktrace (std::ostream& out)
printf ("Obtained %zd stack frames.\n", size);
- for (i = 0; i < size; i++) {
+ for (i = 0; i < size && (levels == 0 || i < levels); i++) {
out << strings[i] << std::endl;
}
@@ -34,7 +34,7 @@ PBD::stacktrace (std::ostream& out)
#else
void
-PBD::stacktrace (std::ostream& out)
+PBD::stacktrace (std::ostream& out, int levels)
{
out << "stack tracing is not enabled on this platform" << std::endl;
}