Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'mc++' into mc-merge
[simgrid.git] / src / include / mc / datatypes.h
1 /* Copyright (c) 2008-2014. The SimGrid Team.
2  * All rights reserved.                                                     */
3
4 /* This program is free software; you can redistribute it and/or modify it
5  * under the terms of the license (GNU LGPL) which comes with this package. */
6
7 #ifndef MC_DATATYPE_H
8 #define MC_DATATYPE_H
9
10 #define UNW_LOCAL_ONLY
11
12 #include "xbt/misc.h"
13 #include "xbt/swag.h"
14 #include "xbt/fifo.h"
15
16 #include <libunwind.h>
17 #include <dwarf.h>
18
19 SG_BEGIN_DECL()
20
21 /******************************* Transitions **********************************/
22
23 typedef struct s_mc_transition *mc_transition_t;
24
25
26 /*********** Structures for snapshot comparison **************************/
27
28 typedef struct s_mc_heap_ignore_region{
29   int block;
30   int fragment;
31   void *address;
32   size_t size;
33 }s_mc_heap_ignore_region_t, *mc_heap_ignore_region_t;
34
35 typedef struct s_stack_region{
36   void *address;
37   char *process_name;
38   void *context;
39   size_t size;
40   int block;
41 }s_stack_region_t, *stack_region_t;
42
43 void heap_ignore_region_free(mc_heap_ignore_region_t r);
44 void heap_ignore_region_free_voidp(void *r);
45
46 /************ Object info *************/
47
48 typedef struct s_mc_object_info s_mc_object_info_t, *mc_object_info_t;
49
50 /************ DWARF structures *************/
51
52 typedef int e_dw_type_type;
53
54 typedef struct s_dw_type s_dw_type_t, *dw_type_t;
55
56 struct s_dw_type{
57   e_dw_type_type type;
58   void *id; /* Offset in the section (in hexadecimal form) */
59   char *name; /* Name of the type */
60   int byte_size; /* Size in bytes */
61   int element_count; /* Number of elements for array type */
62   char *dw_type_id; /* DW_AT_type */
63   xbt_dynar_t members; /* if DW_TAG_structure_type, DW_TAG_class_type, DW_TAG_union_type*/
64   int is_pointer_type;
65   int offset;
66   dw_type_t subtype;
67   dw_type_t other_object_same_type; // The same (but more complete) type in the other object.
68 };
69
70 char* get_type_description(mc_object_info_t info, char *type_name);
71
72 SG_END_DECL()
73 #endif                          /* _MC_MC_H */