3419fc1ee1681917453c59e6fa0b1e26cfd78c9c
[repair.git] / Repair / RepairCompiler / structextract / dumpstructures.h
1 /*
2    This file is part of Kvasir, a Valgrind skin that implements the
3    C language front-end for the Daikon Invariant Detection System
4
5    Copyright (C) 2004 Philip Guo, MIT CSAIL Program Analysis Group
6
7    This program is free software; you can redistribute it and/or
8    modify it under the terms of the GNU General Public License as
9    published by the Free Software Foundation; either version 2 of the
10    License, or (at your option) any later version.
11 */
12
13 /* kvasir_runtime.h:
14    Contains the majority of the type definitions that are necessary
15    for Kvasir functionality.
16 */
17
18 #ifndef DUMP_H
19 #define DUMP_H
20
21 #include "typedata.h"
22 #include "common.h"
23 #include "GenericHashtable.h"
24
25 struct StructureElement {
26   char *fieldname;
27   int StructureType;
28   int isArray;
29   int arraySize;
30   char *structurename;
31   struct StructureElement *next;
32 };
33
34 struct Structure {
35   char* name;
36   struct StructureElement * struct_ele;
37 };
38
39 #define TYPE_INT 0
40 #define TYPE_SHORT 1
41 #define TYPE_BYTE 2
42 #define TYPE_BIT 3
43 #define TYPE_STRUCTURE 4
44 #define TYPE_POINTER 5
45 #define TYPE_RESERVED 6
46
47 /* Array that holds information about all functions*/
48 struct Structure * TypeArray;
49 unsigned long TypeArraySize;
50
51 void daikon_preprocess_entry_array();
52 void initializeTypeArray();
53 int entry_is_type(dwarf_entry *entry);
54 char * printname(dwarf_entry * entry,int op);
55 int getsize(dwarf_entry *type);
56 int printtype(collection_type *collection_ptr,struct genhashtable *);
57 #endif