-#include <stdint.h>
-
-#include <string>
-
-#include <simgrid_config.h>
-#include <xbt/dict.h>
-#include <xbt/dynar.h>
-
-#include <elfutils/libdw.h>
-
-#include "mc_forward.h"
-#include "mc_location.h"
-#include "mc_process.h"
-#include "../smpi/private.h"
-
-// ***** Type
-
-typedef int e_mc_type_type;
-
-namespace simgrid {
-namespace mc {
-
-/** Represents a type in the program
- *
- * It is currently used to represent members of structs and unions as well.
- */
-class Type {
-public:
- Type();
- ~Type();
- Type(Type const& type) = delete;
- Type& operator=(Type const&) = delete;
-
- e_mc_type_type type;
- Dwarf_Off id; /* Offset in the section (in hexadecimal form) */
- std::string name; /* Name of the type */
- int byte_size; /* Size in bytes */
- int element_count; /* Number of elements for array type */
- std::string dw_type_id; /* DW_AT_type id */
- xbt_dynar_t members; /* if DW_TAG_structure_type, DW_TAG_class_type, DW_TAG_union_type*/
- int is_pointer_type;
-
- // Location (for members) is either of:
- simgrid::mc::DwarfExpression location_expression;
-
- mc_type_t subtype; // DW_AT_type
- mc_type_t full_type; // The same (but more complete) type
-
- bool has_offset_location() const
- {
- return location_expression.size() == 1 &&
- location_expression[0].atom == DW_OP_plus_uconst;
- }
-
- // TODO, check if this shortcut is really necessary
- int offset() const
- {
- xbt_assert(this->has_offset_location());
- return this->location_expression[0].number;
- }
-
- void offset(int new_offset)
- {
- Dwarf_Op op;
- op.atom = DW_OP_plus_uconst;
- op.number = new_offset;
- this->location_expression = { op };
- }
-};
-
-}
-}
-
-// ***** Object info