19.06.2014 Views

Rim Chaabane. Analyse dynamique de ... - Université Paris 8

Rim Chaabane. Analyse dynamique de ... - Université Paris 8

Rim Chaabane. Analyse dynamique de ... - Université Paris 8

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>Analyse</strong> <strong>dynamique</strong> <strong>de</strong> programmes C<br />

1<br />

2 /* datastruct.h<br />

3 *<br />

4 * (C) Copyright May 7 1995, Edmond J. Breen.<br />

5 * ALL RIGHTS RESERVED.<br />

6 * This co<strong>de</strong> may be copied for personal, non-profit use only.<br />

7 *<br />

8 */<br />

9<br />

10 #ifn<strong>de</strong>f DATASTRUCT_H<br />

11 #<strong>de</strong>fine DATASTRUCT_H<br />

12<br />

13 #if !<strong>de</strong>fined(_eic_ptr) && !<strong>de</strong>fined(_EiC)<br />

14 #<strong>de</strong>fine _eic_ptr<br />

15 type<strong>de</strong>f struct {void *p, *sp, *ep;} ptr_t;<br />

16 #endif<br />

17<br />

18<br />

19 #inclu<strong>de</strong> "stab.h"<br />

20<br />

21 #inclu<strong>de</strong> "eicval.h"<br />

22<br />

23<br />

24 type<strong>de</strong>f struct {<br />

25 int n;<br />

26 val_t * val;<br />

27 }eicstack_t;<br />

28<br />

29 type<strong>de</strong>f struct extern_t {<br />

30 char * name;<br />

31 type_expr * type;<br />

32 int n;<br />

33 unsigned *loc;<br />

34 struct extern_t *nxt;<br />

35 } extern_t;<br />

36<br />

37 /* methods for extern_t */<br />

38 #<strong>de</strong>fine crt_extern() xcalloc(sizeof(extern_t),1)<br />

39 #<strong>de</strong>fine getExtName(x) ((x)->name)<br />

40 #<strong>de</strong>fine setExtName(x,y) ((x)->name = y)<br />

41 #<strong>de</strong>fine getExtType(x) ((x)->type)<br />

42 #<strong>de</strong>fine setExtType(x,y) ((x)->type = y)<br />

43 #<strong>de</strong>fine getExtNext(x) ((x)->nxt)<br />

44 #<strong>de</strong>fine setExtNext(x,y) ((x)->nxt = y)<br />

45<br />

46<br />

47 type<strong>de</strong>f struct {<br />

48 char cl; /* closed flag */<br />

49 int n; /* number of members */<br />

50 int tsize; /* total size in bytes of struct */<br />

51 int align; /* alignment of structure */<br />

52 type_expr **type; /* member types */<br />

53 char **id; /* member names */<br />

54 int *offset; /* offsets to members data position*/<br />

55 int ntags; /* number of tags */<br />

56 type_expr **tag; /* tag types */<br />

57 }struct_t;<br />

58<br />

59<br />

60 type<strong>de</strong>f struct {<br />

61 unsigned short Tok;<br />

62 int Tab;__ /* name space table */<br />

63 unsigned char Pflag; /* processed flag */<br />

64 unsigned char Sclass; /* storage class */<br />

65 unsigned char Typequal; /* type qualifier */<br />

66 struct symentry_t * Sym;<br />

67 co<strong>de</strong>_t Co<strong>de</strong>;<br />

68 type_expr * Type;<br />

121

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!