-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdebug.h
66 lines (52 loc) · 2.17 KB
/
debug.h
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
/* debug.h -- UMB Scheme, debugger interface.
UMB Scheme Interpreter $Revision: 3.2 $
Copyright (C) 1988, 1996 William R Campbell
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 1, or (at your option)
any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
UMB Scheme was written by Bill Campbell with help from Karl Berry,
Barbara Dixey, Ira Gerstein, Mary Glaser, Kathy Hargreaves, Bill McCabe,
Long Nguyen, Susan Quina, Jeyashree Sivasubram, Bela Sohoni, John Tam
and Thang Quoc Tran.
For additional information about UMB Scheme, contact the author:
Bill Campbell
Department of Mathematics and Computer Science
University of Massachusetts at Boston
Harbor Campus
Boston, MA 02125
Telephone: 617-287-6449 Internet: bill@cs.umb.edu
*/
Import void Steer_Debugging();
Import void Initialize_Debug();
Import Boolean Control_C;
Import Boolean Debugger_Switched_On;
Import Boolean Debugger_Activated;
Import Boolean Debugging;
Import Boolean Go_Processed;
Import Boolean Evaluating;
Import Boolean Evaluation_Broken;
Import Boolean Tracing;
Import Boolean Tracing_All;
Import Integer Stepping;
Import Integer Stepper;
Import Object Traced_Procedures;
Import Integer Trace_Margin;
#define TRACE_INDENT 4
#define MAX_TRACE_MARGIN 40
#define Traced(p) ((Is_Procedure(p)&&Get_Procedure_Tracing(p)) || \
(Is_Primitive(p)&&Get_Primitive_Tracing(p)))
#define Name_For(p) (Is_Procedure(p)?Get_Procedure_Name(p):\
Is_Primitive(p)?Get_Primitive_Name(p):\
"<continuation>")
#define Trace_Right() (Trace_Margin=\
((Trace_Margin>=MAX_TRACE_MARGIN)?0:Trace_Margin+TRACE_INDENT))
#define Trace_Left() (Trace_Margin=\
((Trace_Margin<=0)?MAX_TRACE_MARGIN:Trace_Margin-TRACE_INDENT))