X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/f513bba121b464f479e0a7a216dab3682162ae4c..0bb08c80b2bff9de24524dc98f04cd145dfc93c0:/src/mc/mc_unw.hpp diff --git a/src/mc/mc_unw.hpp b/src/mc/mc_unw.hpp index 3a62c533cb..f776a95cca 100644 --- a/src/mc/mc_unw.hpp +++ b/src/mc/mc_unw.hpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2015-2017. The SimGrid Team. All rights reserved. */ +/* Copyright (c) 2015-2018. The SimGrid Team. All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it * under the terms of the license (GNU LGPL) which comes with this package. */ @@ -28,8 +28,8 @@ #include "src/mc/mc_forward.hpp" #include "xbt/base.h" -#include #include +#include #include namespace simgrid { @@ -37,7 +37,6 @@ namespace unw { XBT_PRIVATE unw_addr_space_t create_addr_space(); XBT_PRIVATE void* create_context(unw_addr_space_t as, pid_t pid); - } } @@ -57,39 +56,26 @@ public: unw_cursor_t cursor(); private: // Methods and virtual table for libunwind - static int find_proc_info(unw_addr_space_t as, - unw_word_t ip, unw_proc_info_t *pip, - int need_unwind_info, void* arg) noexcept; - static void put_unwind_info(unw_addr_space_t as, - unw_proc_info_t *pip, void* arg) noexcept; - static int get_dyn_info_list_addr(unw_addr_space_t as, - unw_word_t *dilap, void* arg) noexcept; - static int access_mem(unw_addr_space_t as, - unw_word_t addr, unw_word_t *valp, - int write, void* arg) noexcept; + static int find_proc_info(unw_addr_space_t as, unw_word_t ip, unw_proc_info_t* pip, int need_unwind_info, + void* arg) noexcept; + static void put_unwind_info(unw_addr_space_t as, unw_proc_info_t* pip, void* arg) noexcept; + static int get_dyn_info_list_addr(unw_addr_space_t as, unw_word_t* dilap, void* arg) noexcept; + static int access_mem(unw_addr_space_t as, unw_word_t addr, unw_word_t* valp, int write, void* arg) noexcept; static void* get_reg(unw_context_t* context, unw_regnum_t regnum) noexcept; - static int access_reg(unw_addr_space_t as, - unw_regnum_t regnum, unw_word_t *valp, - int write, void* arg) noexcept; - static int access_fpreg(unw_addr_space_t as, - unw_regnum_t regnum, unw_fpreg_t *fpvalp, - int write, void* arg) noexcept; - static int resume(unw_addr_space_t as, - unw_cursor_t *cp, void* arg) noexcept; - static int get_proc_name(unw_addr_space_t as, - unw_word_t addr, char *bufp, - size_t buf_len, unw_word_t *offp, - void* arg) noexcept; + static int access_reg(unw_addr_space_t as, unw_regnum_t regnum, unw_word_t* valp, int write, void* arg) noexcept; + static int access_fpreg(unw_addr_space_t as, unw_regnum_t regnum, unw_fpreg_t* fpvalp, int write, void* arg) noexcept; + static int resume(unw_addr_space_t as, unw_cursor_t* cp, void* arg) noexcept; + static int get_proc_name(unw_addr_space_t as, unw_word_t addr, char* bufp, size_t buf_len, unw_word_t* offp, + void* arg) noexcept; static unw_accessors_t accessors; + public: // Create a libunwind address space: static unw_addr_space_t createUnwindAddressSpace(); }; -void MC_dump_stack_unw(FILE* file, unw_cursor_t cursor); void dumpStack(FILE* file, unw_cursor_t cursor); void dumpStack(FILE* file, pid_t pid); - } }