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 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257
|
(dbg-test2.sh:24):
24: set -xv
+set basename on
+# Test of miscellaneous commands:
+# 'source', 'info args', 'show args', 'show warranty', 'show copying', etc.
+#### source command...
+set width 75
+source ../data/prof1.cmd
+set trace-commands on
+# Test a profile
+print "prof1.cmd called"
prof1.cmd called
+source ../data/prof2.cmd
+set trace-commands on
+# Test a profile
+print prof2.cmd called...
prof2.cmd called...
+print calling prof1.cmd...
calling prof1.cmd...
+source ../data/prof1.cmd
+set trace-commands on
+# Test a profile
+print "prof1.cmd called"
prof1.cmd called
+#########################################
+#### Test that ARGs are correct...
+print "_Dbg_arg#: ${#_Dbg_arg[@]}"
_Dbg_arg#: 0
+print "\$1: $1"
$1:
+print "\$2: $2"
$2:
+#########################################
+#### Testing script args...
+## FIXME:
+## info args
+#########################################
+tty
Argument required (terminal name for running target process).
+#### *** GNU things...
+info warranty
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
+#### help commands...
+help
Available commands:
/ debug enable help next show step- untrace
alias delete eval history print signal tbreak up
break disable examine info pwd skip trace watch
commands display file kill quit source tty where
condition down frame list restart step unalias
continue edit handle load set step+ undisplay
Readline command line editing (emacs/vi mode) is available.
Type "help" followed by command name for full documentation.
+help set
set args -- Set argument list to give program being debugged when it is started.
Follow this command with any number of args, to be passed to the program.
set annotate -- Set annotation level.
set autoeval -- Evaluate unrecognized commands is off.
set basename -- Set short filenames (the basename) in debug output is on.
set debugger -- Set debugging the debugger is debugger
set editing -- Set editing of command lines as they are typed is on.
set linetrace -- Set tracing execution of lines before executed is off.
set listsize -- Set number of source lines bashdb will list by default.
set prompt -- bashdb's prompt is:
"bashdb${_Dbg_less}${#_Dbg_history[@]}${_Dbg_greater}$_Dbg_space".
set showcommand -- Set showing the command to execute is auto.
set trace-commands -- Set showing debugger commands is on.
+help set foo
There is no "set foo" command.
+help set ar
Set argument list to give program being debugged when it is started.
Follow this command with any number of args, to be passed to the program.
+help set annotate
Set annotation level.
0 == normal; 1 == fullname (for use when running under emacs).
+help set listsize
Set number of source lines bashdb will list by default.
+help set prompt
bashdb's prompt is:
"bashdb${_Dbg_less}${#_Dbg_history[@]}${_Dbg_greater}$_Dbg_space".
+help set editing
Set editing of command lines as they are typed is on.
+help tty
tty -- Set the output device for debugger output.
+help info
List of info subcommands:
info args -- Argument variables (e.g. $1, $2, ...) of the current stack frame.
info breakpoints -- Status of user-settable breakpoints
info display -- Show all display expressions
info files -- Source files in the program
info functions -- All function names
info line -- list current line number and and file name
info program -- Execution status of the program.
info signals -- What debugger does when program gets various signals
info source -- Information about the current source file
info stack -- Backtrace of the stack
info terminal -- Print terminal device
info variables -- All global and static variable names
info warranty -- Various kinds of warranty you do not have
+info
Info subcommands are:
args display functions source stack variables
breakpoints files program sources terminal watchpoints
+#### history...
+H
28: info
27: help info
26: help tty
25: help set editing
24: help set prompt
23: help set listsize
22: help set annotate
21: help set ar
20: help set foo
19: help set
18: help
17: info warranty
16: tty
15: print "\$2: $2"
14: print "\$1: $1"
13: print "_Dbg_arg#: ${#_Dbg_arg[@]}"
12: print "prof1.cmd called"
11: set trace-commands on
10: source ../data/prof1.cmd
9: print calling prof1.cmd...
8: print prof2.cmd called...
7: set trace-commands on
6: source ../data/prof2.cmd
5: print "prof1.cmd called"
4: set trace-commands on
3: source ../data/prof1.cmd
2: set width 75
1: set basename on
0: set trace-commands on
+H 5
5: print "prof1.cmd called"
4: set trace-commands on
3: source ../data/prof1.cmd
2: set width 75
1: set basename on
0: set trace-commands on
+H 5 3
5: print "prof1.cmd called"
4: set trace-commands on
3: source ../data/prof1.cmd
+history 11
+!11
+!19:p
19: help set
+!-3:p
27: help info
+! -2
List of info subcommands:
info args -- Argument variables (e.g. $1, $2, ...) of the current stack frame.
info breakpoints -- Status of user-settable breakpoints
info display -- Show all display expressions
info files -- Source files in the program
info functions -- All function names
info line -- list current line number and and file name
info program -- Execution status of the program.
info signals -- What debugger does when program gets various signals
info source -- Information about the current source file
info stack -- Backtrace of the stack
info terminal -- Print terminal device
info variables -- All global and static variable names
info warranty -- Various kinds of warranty you do not have
+! 2
+H -2
28: info
27: help info
+H foo
Invalid history number: foo
+H 100000
28: info
27: help info
26: help tty
25: help set editing
24: help set prompt
23: help set listsize
22: help set annotate
21: help set ar
20: help set foo
19: help set
18: help
17: info warranty
16: tty
15: print "\$2: $2"
14: print "\$1: $1"
13: print "_Dbg_arg#: ${#_Dbg_arg[@]}"
12: print "prof1.cmd called"
11: set trace-commands on
10: source ../data/prof1.cmd
9: print calling prof1.cmd...
8: print prof2.cmd called...
7: set trace-commands on
6: source ../data/prof2.cmd
5: print "prof1.cmd called"
4: set trace-commands on
3: source ../data/prof1.cmd
2: set width 75
1: set basename on
0: set trace-commands on
+history -2
List of info subcommands:
info args -- Argument variables (e.g. $1, $2, ...) of the current stack frame.
info breakpoints -- Status of user-settable breakpoints
info display -- Show all display expressions
info files -- Source files in the program
info functions -- All function names
info line -- list current line number and and file name
info program -- Execution status of the program.
info signals -- What debugger does when program gets various signals
info source -- Information about the current source file
info stack -- Backtrace of the stack
info terminal -- Print terminal device
info variables -- All global and static variable names
info warranty -- Various kinds of warranty you do not have
+history 10000
** Number 10000 (10000) should be less than 29
+#### pwd/cd commands...
+pwd
Working directory integration.
+cd .
Working directory integration.
+##########################
+#### Test 'prompt' and 'tty' ...
+set prompt bashdb${_Dbg_greater}$_Dbg_hi${_Dbg_less}$_Dbg_space
+show prompt
bashdb's prompt is:
"bashdb${_Dbg_greater}$_Dbg_hi${_Dbg_less}$_Dbg_space".
+tty /tmp/misc-output.check
|