From bc2d9d666821f33ccc8747d2ed555100f856ff94 Mon Sep 17 00:00:00 2001 From: Martin Quinson Date: Sat, 27 Oct 2018 18:55:53 +0200 Subject: [PATCH] these portability bits should be useless --- src/xbt/backtrace.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/xbt/backtrace.cpp b/src/xbt/backtrace.cpp index 575d2a5e67..53064c6937 100644 --- a/src/xbt/backtrace.cpp +++ b/src/xbt/backtrace.cpp @@ -38,10 +38,9 @@ static bool startWith(std::string str, const char* prefix) void xbt_backtrace_display(xbt_backtrace_location_t* loc, std::size_t count) { -#ifdef HAVE_BACKTRACE std::vector backtrace = simgrid::xbt::resolve_backtrace(loc, count); if (backtrace.empty()) { - fprintf(stderr, "(backtrace not set)\n"); + fprintf(stderr, "(backtrace not set -- maybe unavailable on this architecture?)\n"); return; } fprintf(stderr, "Backtrace (displayed in process %s):\n", SIMIX_process_self_get_name()); @@ -54,9 +53,6 @@ void xbt_backtrace_display(xbt_backtrace_location_t* loc, std::size_t count) startWith(s, "simgrid::xbt::MainFunction") /* main used with thread factory */) break; } -#else - XBT_ERROR("Cannot display backtrace when compiled without libunwind."); -#endif } /** @brief show the backtrace of the current point (lovely while debugging) */ @@ -357,6 +353,11 @@ size_t xbt_backtrace_current(xbt_backtrace_location_t* loc, size_t count) namespace simgrid { namespace xbt { +std::vector resolve_backtrace(xbt_backtrace_location_t const* loc, std::size_t count) +{ + std::vector result; + return result; +} std::vector resolve_backtrace(xbt_backtrace_location_t const* loc, std::size_t count) { -- 2.20.1