namespace ceph {
-void BackTrace::print(std::ostream& out) const
+void ClibBackTrace::print(std::ostream& out) const
{
out << " " << pretty_version_to_str() << std::endl;
for (size_t i = skip; i < size; i++) {
}
}
-void BackTrace::dump(Formatter *f) const
+void ClibBackTrace::dump(Formatter *f) const
{
f->open_array_section("backtrace");
for (size_t i = skip; i < size; i++) {
f->close_section();
}
-std::string BackTrace::demangle(const char* name)
+std::string ClibBackTrace::demangle(const char* name)
{
// find the parentheses and address offset surrounding the mangled name
#ifdef __FreeBSD__
}
}
+void PyBackTrace::dump(Formatter *f) const
+{
+ f->open_array_section("backtrace");
+ for (auto& i : strings) {
+ f->dump_string("frame", i);
+ }
+ f->close_section();
+}
+
+void PyBackTrace::print(std::ostream& out) const
+{
+ for (auto& i : strings) {
+ out << i << std::endl;
+ }
+}
+
}