X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/611d822b02f836d7abe031cced6adc4281ef4356..1eb051efc5674f17ae41317c28620a5f701d9a75:/src/xbt/backtrace_linux.cpp diff --git a/src/xbt/backtrace_linux.cpp b/src/xbt/backtrace_linux.cpp index abedb8190a..3c8ecb3820 100644 --- a/src/xbt/backtrace_linux.cpp +++ b/src/xbt/backtrace_linux.cpp @@ -136,10 +136,14 @@ static std::string get_binary_path() return ""; } +std::vector 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 resolveBacktrace( - xbt_backtrace_location_t const* loc, std::size_t count) +std::vector resolve_backtrace(xbt_backtrace_location_t const* loc, std::size_t count) { std::vector result; @@ -200,7 +204,7 @@ std::vector resolveBacktrace( line_func[strlen(line_func) - 1] = '\0'; } else { XBT_VERB("Cannot run fgets to look for symbol %zu, addr %s", i, addrs[i].c_str()); - strncpy(line_func, "???",3); + strncpy(line_func, "???", 4); } if (fgets(line_pos, 1024, pipe)) { line_pos[strlen(line_pos) - 1] = '\0'; @@ -295,7 +299,7 @@ std::vector resolveBacktrace( line_func[strlen(line_func) - 1] = '\0'; } else { XBT_VERB("Cannot read result of subcommand %s", subcmd.c_str()); - strncpy(line_func, "???",3); + strncpy(line_func, "???", 4); } if (fgets(line_pos, 1024, subpipe)) { line_pos[strlen(line_pos) - 1] = '\0';