X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/d098dd9e12ee321b061421f535b2b56ce7691673..1fc042e8bc9c51f9267fa1936deaebe59ae01ee7:/src/mc/mc_member.cpp diff --git a/src/mc/mc_member.cpp b/src/mc/mc_member.cpp index 0a5040bf61..c2c67e7b1e 100644 --- a/src/mc/mc_member.cpp +++ b/src/mc/mc_member.cpp @@ -1,14 +1,12 @@ -/* Copyright (c) 2014-2015. The SimGrid Team. +/* Copyright (c) 2014-2017. 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. */ -#include - -#include "src/mc/mc_object_info.h" -#include "src/mc/mc_private.h" #include "src/mc/Type.hpp" +#include "src/mc/mc_dwarf.hpp" +#include "src/mc/mc_private.hpp" namespace simgrid { namespace dwarf { @@ -18,20 +16,16 @@ namespace dwarf { * @param object Process address of the struct/class * @param type Type of the struct/class * @param member Member description - * @param snapshot Snapshot (or NULL) + * @param snapshot Snapshot (or nullptr) * @return Process address of the given member of the 'object' struct/class */ void *resolve_member( const void *base, simgrid::mc::Type* type, simgrid::mc::Member* member, simgrid::mc::AddressSpace* address_space, int process_index) { - // TODO, get rid of this? - if (!member->has_offset_location()) - return ((char *) base) + member->offset(); - ExpressionContext state; - state.frame_base = NULL; - state.cursor = NULL; + state.frame_base = nullptr; + state.cursor = nullptr; state.address_space = address_space; state.process_index = process_index;