X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/96a85c769aab9ee6291775896bd11f19aa4c3ed0..066ae3631a383ef0338cccfb8e153df1c7f13995:/src/mc/mc_global.c diff --git a/src/mc/mc_global.c b/src/mc/mc_global.c index da02e1d763..0fff990ace 100644 --- a/src/mc/mc_global.c +++ b/src/mc/mc_global.c @@ -5,6 +5,7 @@ * under the terms of the license (GNU LGPL) which comes with this package. */ #include +#include #include "mc_base.h" @@ -785,7 +786,16 @@ void MC_dump_stacks(FILE* file) unw_word_t off; do { const char * name = !unw_get_proc_name(&c, buffer, 100, &off) ? buffer : "?"; +#if defined(__x86_64__) + unw_word_t rip = 0; + unw_word_t rsp = 0; + unw_get_reg(&c, UNW_X86_64_RIP, &rip); + unw_get_reg(&c, UNW_X86_64_RSP, &rsp); + fprintf(file, " %i: %s (RIP=0x%" PRIx64 " RSP=0x%" PRIx64 ")\n", + nframe, name, rip, rsp); +#else fprintf(file, " %i: %s\n", nframe, name); +#endif ++nframe; } while(unw_step(&c));