From 30563d26d6d84d528cda7deda5baa6730cebd948 Mon Sep 17 00:00:00 2001 From: Arnaud Giersch Date: Thu, 9 Jan 2020 08:38:13 +0100 Subject: [PATCH] Pass large parameter by address. --- src/mc/inspect/mc_unw.hpp | 2 +- src/mc/mc_global.cpp | 10 +++++----- src/mc/remote/RemoteClient.cpp | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/mc/inspect/mc_unw.hpp b/src/mc/inspect/mc_unw.hpp index 206c92d5bf..beb19d68b4 100644 --- a/src/mc/inspect/mc_unw.hpp +++ b/src/mc/inspect/mc_unw.hpp @@ -68,7 +68,7 @@ public: static unw_addr_space_t createUnwindAddressSpace(); }; -void dumpStack(FILE* file, unw_cursor_t cursor); +void dumpStack(FILE* file, unw_cursor_t* cursor); } // namespace mc } // namespace simgrid diff --git a/src/mc/mc_global.cpp b/src/mc/mc_global.cpp index b6d1c098db..2bfdb0cff4 100644 --- a/src/mc/mc_global.cpp +++ b/src/mc/mc_global.cpp @@ -106,22 +106,22 @@ void MC_automaton_load(const char *file) namespace simgrid { namespace mc { -void dumpStack(FILE* file, unw_cursor_t cursor) +void dumpStack(FILE* file, unw_cursor_t* cursor) { int nframe = 0; char buffer[100]; unw_word_t off; do { - const char* name = not unw_get_proc_name(&cursor, buffer, 100, &off) ? buffer : "?"; + const char* name = not unw_get_proc_name(cursor, buffer, 100, &off) ? buffer : "?"; // Unmangle C++ names: auto realname = simgrid::xbt::demangle(name); #if defined(__x86_64__) unw_word_t rip = 0; unw_word_t rsp = 0; - unw_get_reg(&cursor, UNW_X86_64_RIP, &rip); - unw_get_reg(&cursor, UNW_X86_64_RSP, &rsp); + unw_get_reg(cursor, UNW_X86_64_RIP, &rip); + unw_get_reg(cursor, UNW_X86_64_RSP, &rsp); fprintf(file, " %i: %s (RIP=0x%" PRIx64 " RSP=0x%" PRIx64 ")\n", nframe, realname.get(), (std::uint64_t)rip, (std::uint64_t)rsp); #else @@ -129,7 +129,7 @@ void dumpStack(FILE* file, unw_cursor_t cursor) #endif ++nframe; - } while(unw_step(&cursor)); + } while (unw_step(cursor)); } } diff --git a/src/mc/remote/RemoteClient.cpp b/src/mc/remote/RemoteClient.cpp index e727460f0a..fae057177e 100644 --- a/src/mc/remote/RemoteClient.cpp +++ b/src/mc/remote/RemoteClient.cpp @@ -622,7 +622,7 @@ void RemoteClient::dump_stack() return; } - simgrid::mc::dumpStack(stderr, cursor); + simgrid::mc::dumpStack(stderr, &cursor); _UPT_destroy(context); unw_destroy_addr_space(as); -- 2.20.1