Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Spell check.
[simgrid.git] / src / mc / inspect / ObjectInformation.cpp
index 0dedb75..ed52d5a 100644 (file)
@@ -20,7 +20,7 @@ namespace mc {
  * (there is no offset) i.e.
  * \f$\text{virtual address} = \{dwarf address}\f$
  *
- * For a shared object, the addresses are offset from the begining
+ * For a shared object, the addresses are offset from the beginning
  * of the shared object (the base address of the mapped shared
  * object must be used as offset
  * i.e. \f$\text{virtual address} = \text{shared object base address}
@@ -83,9 +83,10 @@ simgrid::mc::Frame* ObjectInformation::find_function(const void* ip) const
 
 const simgrid::mc::Variable* ObjectInformation::find_variable(const char* name) const
 {
-  for (simgrid::mc::Variable const& variable : this->global_variables)
+  for (simgrid::mc::Variable const& variable : this->global_variables) {
     if (variable.name == name)
       return &variable;
+  }
   return nullptr;
 }
 
@@ -233,7 +234,10 @@ void find_object_address(std::vector<simgrid::xbt::VmMap> const& maps, simgrid::
 
     // This is the GNU_RELRO-part of the data segment:
     else if (reg.prot == PROT_READ) {
-      xbt_assert(not result->start_ro, "Multiple read only segments for %s, not supported", maps[i].pathname.c_str());
+      xbt_assert(not result->start_ro,
+                 "Multiple read-only segments for %s, not supported. Compiling with the following may help: "
+                "-Wl,-znorelro -Wl,-znoseparate-code",
+                 maps[i].pathname.c_str());
       result->start_ro = (char*)reg.start_addr;
       result->end_ro   = (char*)reg.end_addr;
     }