Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch mc into mc-perf
[simgrid.git] / src / mc / mc_dwarf.c
index 84e4260..3ff5e98 100644 (file)
@@ -1,6 +1,5 @@
 /* Copyright (c) 2008-2013. 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. */
 
@@ -634,6 +633,10 @@ static void MC_dwarf_handle_type_die(mc_object_info_t info, Dwarf_Die* die, Dwar
 
   char* key = bprintf("%" PRIx64, (uint64_t) type->id);
   xbt_dict_set(info->types, key, type, NULL);
+
+  if(type->name && type->byte_size!=0) {
+    xbt_dict_set(info->types_by_name, type->name, type, NULL);
+  }
 }
 
 /** \brief Convert libdw location expresion elment into native one (or NULL in some cases) */
@@ -947,7 +950,16 @@ void MC_dwarf_get_variables(mc_object_info_t info) {
   size_t length;
   while (dwarf_nextcu (dwarf, offset, &next_offset, &length, NULL, NULL, NULL) == 0) {
     Dwarf_Die die;
+
     if(dwarf_offdie(dwarf, offset+length, &die)!=NULL) {
+
+      // Skip C++ for now (we will add support for it soon):
+      int lang = dwarf_srclang(&die);
+      if((lang==DW_LANG_C_plus_plus) || (lang==DW_LANG_ObjC_plus_plus)) {
+        offset = next_offset;
+        continue;
+      }
+
       MC_dwarf_handle_die(info, &die, &die, NULL);
     }
     offset = next_offset;