File: dissect.h

package info (click to toggle)
sparse 0.6.4-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 5,868 kB
  • sloc: ansic: 46,050; sh: 614; python: 301; perl: 293; makefile: 279
file content (38 lines) | stat: -rw-r--r-- 759 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#ifndef	DISSECT_H
#define	DISSECT_H

#include <stdio.h>
#include "parse.h"
#include "expression.h"
#include "scope.h"

#define	U_SHIFT		8

#define	U_R_AOF		0x01
#define	U_W_AOF		0x02

#define	U_R_VAL		0x04
#define	U_W_VAL		0x08

#define	U_R_PTR		(U_R_VAL << U_SHIFT)
#define	U_W_PTR		(U_W_VAL << U_SHIFT)

struct reporter
{
	void (*r_symdef)(struct symbol *);
	void (*r_memdef)(struct symbol *, struct symbol *);

	void (*r_symbol)(unsigned, struct position *, struct symbol *);
	void (*r_member)(unsigned, struct position *, struct symbol *, struct symbol *);
};

extern struct symbol *dissect_ctx;

static inline bool sym_is_local(struct symbol *sym)
{
	return !toplevel(sym->scope);
}

extern void dissect(struct reporter *, struct string_list *);

#endif