*
* Try ro resolve symbols and source code location.
*/
-XBT_PUBLIC std::vector<std::string> resolveBacktrace(xbt_backtrace_location_t const* loc, std::size_t count);
+XBT_PUBLIC std::vector<std::string> resolve_backtrace(xbt_backtrace_location_t const* loc, std::size_t count);
+XBT_ATTRIB_DEPRECATED_v323("Please use xbt::resolve_backtrace()") XBT_PUBLIC std::vector<std::string> resolveBacktrace(xbt_backtrace_location_t const* loc, std::size_t count);
}
}
void xbt_backtrace_display(xbt_backtrace_location_t* loc, std::size_t count)
{
#ifdef HAVE_BACKTRACE
- std::vector<std::string> backtrace = simgrid::xbt::resolveBacktrace(loc, count);
+ std::vector<std::string> backtrace = simgrid::xbt::resolve_backtrace(loc, count);
if (backtrace.empty()) {
fprintf(stderr, "(backtrace not set)\n");
return;
namespace simgrid {
namespace xbt {
-std::vector<std::string> resolveBacktrace(
- xbt_backtrace_location_t const* loc, std::size_t count)
+std::vector<std::string> resolveBacktrace(xbt_backtrace_location_t const* loc, std::size_t count) // deprecated
+{
+ return resolve_backtrace(loc, count);
+}
+
+std::vector<std::string> resolve_backtrace(xbt_backtrace_location_t const* loc, std::size_t count)
{
return std::vector<std::string>();
}
return "";
}
+std::vector<std::string> resolveBacktrace(xbt_backtrace_location_t const* loc, std::size_t count) // deprecated
+{
+ return resolve_backtrace(loc, count);
+}
+
//FIXME: This code could be greatly improved/simplifyied with
// http://cairo.sourcearchive.com/documentation/1.9.4/backtrace-symbols_8c-source.html
-std::vector<std::string> resolveBacktrace(
- xbt_backtrace_location_t const* loc, std::size_t count)
+std::vector<std::string> resolve_backtrace(xbt_backtrace_location_t const* loc, std::size_t count)
{
std::vector<std::string> result;
// Do we have a backtrace?
if (with_context != nullptr && not simgrid::config::get_value<bool>("exception/cutpath")) {
- auto backtrace = simgrid::xbt::resolveBacktrace(
- with_context->backtrace().data(), with_context->backtrace().size());
+ auto backtrace =
+ simgrid::xbt::resolve_backtrace(with_context->backtrace().data(), with_context->backtrace().size());
for (std::string const& s : backtrace)
XBT_LOG(prio, " -> %s", s.c_str());
}
XBT_LOG(xbt_log_priority_critical, "Display of current backtrace disabled by --cfg=exception/cutpath.");
return;
}
- std::vector<std::string> res = resolveBacktrace(&bt[0], bt.size());
+ std::vector<std::string> res = resolve_backtrace(&bt[0], bt.size());
XBT_LOG(xbt_log_priority_critical, "Current backtrace:");
for (std::string const& s : res)
XBT_LOG(xbt_log_priority_critical, " -> %s", s.c_str());