Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[mc] Deduplicate address location resolution in MC_dwarf_resolve_location()
[simgrid.git] / src / include / mc / datatypes.h
index 2d7f1c0..d13ce8c 100644 (file)
@@ -10,6 +10,9 @@
 #include "xbt/swag.h"
 #include "xbt/fifo.h"
 
+#include <libunwind.h>
+#include <dwarf.h>
+
 SG_BEGIN_DECL()
 
 /******************************* Transitions **********************************/
@@ -39,25 +42,14 @@ void heap_ignore_region_free_voidp(void *r);
 
 /************ DWARF structures *************/
 
-typedef enum{
-  e_dw_base_type = 0,
-  e_dw_enumeration_type,
-  e_dw_enumerator,
-  e_dw_typedef,
-  e_dw_const_type,
-  e_dw_array_type,
-  e_dw_pointer_type,
-  e_dw_structure_type,
-  e_dw_union_type,
-  e_dw_subroutine_type,
-  e_dw_volatile_type
-}e_dw_type_type;
+typedef int e_dw_type_type;
 
 typedef struct s_dw_type{
   e_dw_type_type type;
   void *id; /* Offset in the section (in hexadecimal form) */
   char *name; /* Name of the type */
-  int size; /* Sometimes it si the byte size, sometimes it is the number of elements */
+  int byte_size; /* Size in bytes */
+  int element_count; /* Number of elements for array type */
   char *dw_type_id; /* DW_AT_type */
   xbt_dynar_t members; /* if DW_TAG_structure_type, DW_TAG_union_type*/
   int is_pointer_type;