X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/61427a88a76a2c2ef25d0d5b8132995c6f550e5c..fbcf6ab31cae1988be858f9f894dafe529c575d7:/src/mc/ObjectInformation.cpp diff --git a/src/mc/ObjectInformation.cpp b/src/mc/ObjectInformation.cpp index 015a60b345..18c2da3f0d 100644 --- a/src/mc/ObjectInformation.cpp +++ b/src/mc/ObjectInformation.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2014-2015. The SimGrid Team. +/* Copyright (c) 2014-2019. The SimGrid Team. * All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it @@ -17,7 +17,7 @@ namespace mc { /* For an executable object, addresses are virtual address * (there is no offset) i.e. - * \f$\text{virtual address} = \{dwarf address}\f$; + * \f$\text{virtual address} = \{dwarf address}\f$ * * For a shared object, the addreses are offset from the begining * of the shared object (the base address of the mapped shared @@ -81,9 +81,9 @@ simgrid::mc::Frame* ObjectInformation::find_function(const void *ip) const return nullptr; } -simgrid::mc::Variable* ObjectInformation::find_variable(const char* name) const +const simgrid::mc::Variable* ObjectInformation::find_variable(const char* name) const { - for (simgrid::mc::Variable& variable : this->global_variables) + for (simgrid::mc::Variable const& variable : this->global_variables) if(variable.name == name) return &variable; return nullptr; @@ -108,11 +108,11 @@ void ObjectInformation::remove_global_variable(const char* name) if (cmp == 0) { // Find the whole range: - size_type first = cursor; + first = cursor; while (first != 0 && this->global_variables[first - 1].name == name) first--; size_type size = this->global_variables.size(); - size_type last = cursor; + last = cursor; while (last != size - 1 && this->global_variables[last + 1].name == name) last++;