X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/39b079c66644d717e0a7983d3325410dd05152b2..b7ba586806d5d92f3f9aaf1f1133ef3a555d6e1d:/src/mc/mc_object_info.cpp diff --git a/src/mc/mc_object_info.cpp b/src/mc/mc_object_info.cpp index 2b00607c68..46c4630101 100644 --- a/src/mc/mc_object_info.cpp +++ b/src/mc/mc_object_info.cpp @@ -11,34 +11,142 @@ #include "mc_object_info.h" #include "mc_private.h" -dw_frame_t MC_file_object_info_find_function(mc_object_info_t info, const void *ip) +namespace simgrid { +namespace mc { + +// Free functions + +static void mc_frame_free(void* frame) +{ + delete (simgrid::mc::Frame*)frame; +} + +static void mc_type_free(void* t) +{ + delete (simgrid::mc::Type*)t; +} + +// Type + +Type::Type() +{ + this->type = 0; + this->id = 0; + this->byte_size = 0; + this->element_count = 0; + this->is_pointer_type = 0; + this->type_id = 0; + this->subtype = nullptr; + this->full_type = nullptr; +} + +// Type + +Variable::Variable() +{ + this->dwarf_offset = 0; + this->global = 0; + this->type = nullptr; + this->type_id = 0; + this->address = nullptr; + this->start_scope = 0; + this->object_info = nullptr; +} + +// Frame + +Frame::Frame() +{ + this->tag = 0; + this->low_pc = nullptr; + this->high_pc = nullptr; + this->id = 0; + this->abstract_origin_id = 0; + this->object_info = nullptr; +} + +// ObjectInformations + +ObjectInformation::ObjectInformation() { - xbt_dynar_t dynar = info->functions_index; - mc_function_index_item_t base = - (mc_function_index_item_t) xbt_dynar_get_ptr(dynar, 0); + this->flags = 0; + 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; +} + +/** Find the DWARF offset for this ELF object + * + * An offset is applied to address found in DWARF: + * + *