1 /* $Id: scope.h,v 1.5 1994/06/24 11:01:12 ceriel Exp $ */
6 struct scope *sc_static_encl; /* linked list of enclosing scopes */
7 struct symbol *sc_symbs; /* symbols defined in this scope */
8 struct symbol *sc_definedby; /* symbol defining this scope */
9 long sc_start; /* start address of code of this scope */
10 long sc_bp_opp; /* first breakpoint opportunity */
11 int sc_bp_lineno; /* linenumber belonging to this bp. */
12 short sc_proclevel; /* proc level of this scope */
13 char sc_has_activation_record;
16 extern p_scope PervasiveScope, CurrentScope, FileScope;
18 /* extern init_scope();
19 Initializes the scope routines.
23 /* extern open_scope(struct symbol *name, int has_activation);
24 Opens a new scope and assigns it to CurrentScope; The new scope is defined
25 by 'name' and if 'has_activation' is set, it has an activation record.
29 /* extern close_scope();
30 Closes the current scope; CurrentScope becomes the statically enclosing
35 /* extern add_scope_addr(p_scope sc);
36 Adds scope 'sc' to the list of scopes that have an address at runtime.
38 extern add_scope_addr();
40 /* extern p_scope get_scope_from_addr(t_addr a);
41 Returns the scope of the code at address 'a', or 0 if it could not be found.
43 extern p_scope get_scope_from_addr();
45 /* extern p_scope get_next_scope_from_addr(t_addr a);
46 Returns the scope following the one of the code at address 'a',
47 and that has an activation record,
48 or 0 if it could not be found.
50 extern p_scope get_next_scope_from_addr();
52 /* extern p_scope base_scope(p_scope sc);
53 Returns the closest enclosing scope of 'sc' that has an activation record.
55 extern p_scope base_scope();
57 /* extern int scope_encloses(p_scope scope, from_scope);
58 Returns 1 if scope encloses from from_scope, 0 otherwise.
60 extern int scope_encloses();