mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-06 06:44:57 +01:00
provide a stacktrace function callable directly from C (libpbd_c_stacktrace())
This commit is contained in:
parent
809d605a4a
commit
71f93d3c12
2 changed files with 12 additions and 0 deletions
|
|
@ -38,6 +38,8 @@
|
||||||
#include "pbd/libpbd_visibility.h"
|
#include "pbd/libpbd_visibility.h"
|
||||||
|
|
||||||
|
|
||||||
|
extern "C" { void libpbd_c_stacktrace (int levels); }
|
||||||
|
|
||||||
namespace PBD {
|
namespace PBD {
|
||||||
|
|
||||||
LIBPBD_API void stacktrace (std::ostream& out, int levels = 0, size_t start_level = 0);
|
LIBPBD_API void stacktrace (std::ostream& out, int levels = 0, size_t start_level = 0);
|
||||||
|
|
|
||||||
|
|
@ -131,3 +131,13 @@ PBD::stacktrace (std::ostream& out, int, size_t)
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
extern "C" {
|
||||||
|
|
||||||
|
void
|
||||||
|
libpbd_c_stacktrace (int levels)
|
||||||
|
{
|
||||||
|
PBD::stacktrace (std::cerr, levels);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue