From: Gabriel Corona Date: Mon, 20 Jul 2015 13:42:47 +0000 (+0200) Subject: [mc] Move ObjectInformation methods in mc_object_info.cpp X-Git-Tag: v3_12~438^2~30 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/b3a2217b5c973d5a79c43d555162d2d516aa2631 [mc] Move ObjectInformation methods in mc_object_info.cpp --- diff --git a/src/mc/mc_dwarf.cpp b/src/mc/mc_dwarf.cpp index 4e86738aa3..91e62c045d 100644 --- a/src/mc/mc_dwarf.cpp +++ b/src/mc/mc_dwarf.cpp @@ -20,16 +20,6 @@ #include "mc_object_info.h" #include "mc_private.h" -static void mc_variable_free_voidp(void *t) -{ - delete *(simgrid::mc::Variable**)t; -} - -static void mc_frame_free(void* frame) -{ - delete (simgrid::mc::Frame*)frame; -} - static void MC_dwarf_register_global_variable( mc_object_info_t info, std::unique_ptr variable); static void MC_register_variable( @@ -1030,77 +1020,6 @@ void MC_dwarf_get_variables(mc_object_info_t info) close(fd); } -/************************** Free functions *************************/ - -static void dw_type_free(mc_type_t t) -{ - delete t; -} - -// ***** object_info - -namespace simgrid { -namespace mc { - -ObjectInformation::ObjectInformation() -{ - this->flags = 0; - this->file_name = nullptr; - this->start = nullptr; - this->end = nullptr; - this->start_exec = nullptr; - this->end_exec = nullptr; - this->start_rw = nullptr; - this->end_rw = nullptr; - this->start_ro = nullptr; - this->end_ro = nullptr; - this->subprograms = xbt_dict_new_homogeneous(mc_frame_free); - this->types = xbt_dict_new_homogeneous((void (*)(void *)) dw_type_free); - this->full_types_by_name = xbt_dict_new_homogeneous(NULL); - this->functions_index = nullptr; -} - -ObjectInformation::~ObjectInformation() -{ - xbt_free(this->file_name); - xbt_dict_free(&this->subprograms); - xbt_dict_free(&this->types); - xbt_dict_free(&this->full_types_by_name); - xbt_dynar_free(&this->functions_index); -} - -/** Find the DWARF offset for this ELF object - * - * An offset is applied to address found in DWARF: - * - *