provide a stacktrace function callable directly from C (libpbd_c_stacktrace())

This commit is contained in:
Paul Davis 2025-02-11 10:22:45 -07:00
parent 809d605a4a
commit 71f93d3c12
2 changed files with 12 additions and 0 deletions

View file

@ -131,3 +131,13 @@ PBD::stacktrace (std::ostream& out, int, size_t)
}
#endif
extern "C" {
void
libpbd_c_stacktrace (int levels)
{
PBD::stacktrace (std::cerr, levels);
}
}