1SDB(1)                          CSNOBOL4 Manual                         SDB(1)
2
3
4

NAME

6       sdb - SNOBOL4 debugger
7

SYNOPSIS

9       sdb [ options ... ] program.sno
10

DESCRIPTION

12       sdb is a debugger for snobol4(1) programs, in the mold (clawning fone)
13       of gdb(1), The GNU debugger.  sdb(1) uses readline(3) for command line
14       editing/history when available.
15
16   Commands
17       break LABEL_OR_STATEMENT_NUMBER
18           Set a breakpoint.
19
20       bt
21           Display call stack back trace.
22
23       commands BREAKPOINT_NUMBER
24           Add sdb commands to execute (ie; print & continue) to a breakpoint.
25
26       condition BREAKPOINT_NUMBER [ EXPR ]
27           If EXPR is supplied, it is used as a predicate to make the
28           breakpoint conditional, if no EXPR is supplied, any previous
29           condition is removed.
30
31       continue [ COUNT ]
32           Continue from breakpoint.  The optional count specifies how many
33           times to continue past this breakpoint (sets ignore count).
34
35       delete [ BREAKPOINT_NUMBER ]
36           Delete a single breakpoint, or all breakpoints.
37
38       disable [ BREAKPOINT_NUMBER ]
39           Temporarily disable a breakpoint, or all breakpoints.
40
41       enable [ BREAKPOINT_NUMBER ]
42           Re-enable a breakpoint, or all breakpoints.
43
44       finish
45           Resume debugging after current function returns.  Will display
46           function return type and value, if any.
47
48       help
49           Display help.
50
51       ignore BREAKPOINT_NUMBER [ COUNT ]
52           Set (or clear) breakpoint ignore count.
53
54       info
55           Display list of breakpoints and their status.
56
57       list [ LABEL_OR_STATEMENT_NUMBER ]
58           Display source code.
59
60       next [ COUNT ]
61           Single step execution, skipping over function calls.
62
63       print EXPRESSION
64           Evaluate expression and print result.  Can be used to call
65           functions, or set variables.
66
67       quit
68           Exit debugger.
69
70       run
71           Restart program (works by saving breakpoints and restarting
72           snobol4).  New in version 2.1, some restrictions may apply.
73
74       save FILENAME
75           Save breakpoints to file.
76
77       source FILENAME
78           Read sdb commands from file.
79
80       step [ COUNT ]
81           Single step.
82
83       watch VARIABLE
84           Set watchpoint on a variable (break when value changes).
85
86       what EXPRESSION
87           Display the datatype of expression.
88
89       where
90           An alias for bt.
91
92       A blank line repeats the previous command.
93
94       Non-ambiguous abbreviations of commands can be used (ie; s, n).
95
96       The GNU Readline library (when available) will be used for sdb(1) input
97       for command editing and history.
98
99       The keyboard interrupt character (eg; Control-C) will stop a running
100       program and return control to the sdb(1) command prompt.
101
102       If your program calls the SDB() function, it will act as a breakpoint.
103       You can check whether sdb(1) is loaded with the FUNCTION() predicate,
104       ie;
105
106                   FUNCTION('SDB') SDB()
107

FILES

109       ~/.sdbinit
110           initial command file, read on startup.
111
112       .sdb_history
113           saved command history
114
115       /tmp/sdb_listing.pid
116           temporary listing file for sdb.sno to read
117
118       /tmp/sdb_bkpts.pid
119           temporary breakpoint save file for "run" command
120

SEE ALSO

122       snobol4(1), gdb(1), readline(3), snobol4readline(3)
123

AUTHOR

125       Philip L. Budne
126
127       Inspired by Fred Weigel's DDT.SNO and SITBOL's SNODDT.
128

LIMITATIONS

130       sdb(1) uses a wide variety of system facilities and will interact
131       poorly with any programs that use any number of features, including:
132
133       •      Altering listing settings with directive/control lines.
134
135       •      Altering &STLIMIT, &ERRLIMIT, or &TRACE.
136
137       •      Calling SETEXIT()
138

BUGS

140       If you try to put a breakpoint on a label or line with no code or goto
141       fields, the breakpoint will never be triggered.
142
143       You cannot put a breakpoint on the END label (however control always
144       returns to sdb when the END label is reached).
145
146       Interrupt character trapping is in it's infancy, and only occurs at the
147       start of a each statement executed.
148
149       The interrupt character is silently ignored when at the sdb command
150       prompt.
151
152       Leaves an unprotected listing file of the sources in the /tmp directory
153       (create a protected directory?).
154
155       “quit” and “run” commands say program is running even if first line of
156       the program has not yet been executed!
157
158       Some fatal errors cannot be trapped, and sdb will be terminated.
159
160
161
162CSNOBOL4B 2.3.1                 March 31, 2022                          SDB(1)
Impressum