Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[mc] Pass mc_object_info_t arguiments in many places intead of info->types
[simgrid.git] / src / include / mc / datatypes.h
1 /* Copyright (c) 2008-2013. 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 #include "xbt/misc.h"
10 #include "xbt/swag.h"
11 #include "xbt/fifo.h"
12
13 #include <libunwind.h>
14 #include <dwarf.h>
15
16 SG_BEGIN_DECL()
17
18 /******************************* Transitions **********************************/
19
20 typedef struct s_mc_transition *mc_transition_t;
21
22
23 /*********** Structures for snapshot comparison **************************/
24
25 typedef struct s_mc_heap_ignore_region{
26   int block;
27   int fragment;
28   void *address;
29   size_t size;
30 }s_mc_heap_ignore_region_t, *mc_heap_ignore_region_t;
31
32 typedef struct s_stack_region{
33   void *address;
34   char *process_name;
35   void *context;
36   size_t size;
37   int block;
38 }s_stack_region_t, *stack_region_t;
39
40 void heap_ignore_region_free(mc_heap_ignore_region_t r);
41 void heap_ignore_region_free_voidp(void *r);
42
43 /************ Object info *************/
44
45 typedef struct s_mc_object_info s_mc_object_info_t, *mc_object_info_t;
46
47 /************ DWARF structures *************/
48
49 typedef int e_dw_type_type;
50
51 typedef struct s_dw_type s_dw_type_t, *dw_type_t;
52
53 struct s_dw_type{
54   e_dw_type_type type;
55   void *id; /* Offset in the section (in hexadecimal form) */
56   char *name; /* Name of the type */
57   int byte_size; /* Size in bytes */
58   int element_count; /* Number of elements for array type */
59   char *dw_type_id; /* DW_AT_type */
60   xbt_dynar_t members; /* if DW_TAG_structure_type, DW_TAG_union_type*/
61   int is_pointer_type;
62   int offset;
63   dw_type_t subtype;
64 };
65
66 char* get_type_description(mc_object_info_t info, char *type_name);
67
68 SG_END_DECL()
69 #endif                          /* _MC_MC_H */