X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/e7173457dce01a608824b72d2e4ff62572d51d13..b7ba586806d5d92f3f9aaf1f1133ef3a555d6e1d:/src/mc/mc_object_info.cpp diff --git a/src/mc/mc_object_info.cpp b/src/mc/mc_object_info.cpp index e88aee015a..46c4630101 100644 --- a/src/mc/mc_object_info.cpp +++ b/src/mc/mc_object_info.cpp @@ -16,15 +16,14 @@ namespace mc { // Free functions -static void mc_variable_free_voidp(void *t) +static void mc_frame_free(void* frame) { - delete *(simgrid::mc::Variable**)t; + delete (simgrid::mc::Frame*)frame; } -static void mc_frame_free_voipd(void** p) +static void mc_type_free(void* t) { - delete *(mc_frame_t**)p; - *p = nullptr; + delete (simgrid::mc::Type*)t; } // Type @@ -36,6 +35,7 @@ Type::Type() this->byte_size = 0; this->element_count = 0; this->is_pointer_type = 0; + this->type_id = 0; this->subtype = nullptr; this->full_type = nullptr; } @@ -47,18 +47,12 @@ Variable::Variable() this->dwarf_offset = 0; this->global = 0; this->type = nullptr; - this->location_list = {0, nullptr}; + this->type_id = 0; this->address = nullptr; this->start_scope = 0; this->object_info = nullptr; } -Variable::~Variable() -{ - if (this->location_list.locations) - mc_dwarf_location_list_clear(&this->location_list); -} - // Frame Frame::Frame() @@ -66,52 +60,91 @@ Frame::Frame() this->tag = 0; this->low_pc = nullptr; this->high_pc = nullptr; - this->frame_base = {0, nullptr}; - this->variables = xbt_dynar_new( - sizeof(mc_variable_t), mc_variable_free_voidp); this->id = 0; - this->scopes = xbt_dynar_new( - sizeof(mc_frame_t), (void_f_pvoid_t) mc_frame_free_voipd); this->abstract_origin_id = 0; this->object_info = nullptr; } -Frame::~Frame() +// ObjectInformations + +ObjectInformation::ObjectInformation() { - mc_dwarf_location_list_clear(&(this->frame_base)); - xbt_dynar_free(&(this->variables)); - xbt_dynar_free(&(this->scopes)); + 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; } -// ObjectInformations +/** Find the DWARF offset for this ELF object + * + * An offset is applied to address found in DWARF: + * + *