| 1 |
# CLISP .gdbinit |
| 2 |
set language c |
| 3 |
|
| 4 |
define boot |
| 5 |
file lisp.run |
| 6 |
set args -B . -N locale -E 1:1 -q -norc -M lispinit.mem |
| 7 |
end |
| 8 |
document boot |
| 9 |
debug the boot linking set |
| 10 |
end |
| 11 |
|
| 12 |
define base |
| 13 |
file base/lisp.run |
| 14 |
set args -B . -N locale -E 1:1 -q -norc -M base/lispinit.mem |
| 15 |
end |
| 16 |
document base |
| 17 |
debug the base linking set |
| 18 |
end |
| 19 |
|
| 20 |
define full |
| 21 |
file full/lisp.run |
| 22 |
set args -B . -N locale -E 1:1 -q -norc -M full/lispinit.mem |
| 23 |
# -i ../tests/tests -x '(run-test "***/test")' |
| 24 |
# -i clx/new-clx/demos/clx-demos.lisp -x '(clx-demos:run-all-demos)' |
| 25 |
break xlib_error_handler |
| 26 |
break x_type_error |
| 27 |
break error_closed_display |
| 28 |
break error_bdb |
| 29 |
break error_gdbm |
| 30 |
break error_pcre |
| 31 |
end |
| 32 |
document full |
| 33 |
debug the full linking set |
| 34 |
end |
| 35 |
|
| 36 |
define interpreted |
| 37 |
file lisp.run |
| 38 |
set args -B . -N locale -E 1:1 -q -norc -M interpreted.mem |
| 39 |
end |
| 40 |
document interpreted |
| 41 |
debug the boot linking set with the interpreted memory image |
| 42 |
end |
| 43 |
|
| 44 |
define zout |
| 45 |
output object_out($arg0) |
| 46 |
echo \n |
| 47 |
end |
| 48 |
document zout |
| 49 |
print the specified object with PRIN1 (consing!) |
| 50 |
end |
| 51 |
|
| 52 |
define xout |
| 53 |
output nobject_out(0,$arg0) |
| 54 |
echo \n |
| 55 |
end |
| 56 |
document xout |
| 57 |
print the specified object with nobject_out (non-consing) |
| 58 |
end |
| 59 |
|
| 60 |
# ffi.tst requires -E utf-8 |
| 61 |
define run_test |
| 62 |
run -B . -N locale -E utf-8 -q -norc -M lispinit.mem -i tests/tests -x "(run-test \"tests/$arg0\")" |
| 63 |
end |
| 64 |
document run_test |
| 65 |
run the specified test in the test suite |
| 66 |
end |
| 67 |
|
| 68 |
define run_all_tests |
| 69 |
run -B . -N locale -E utf-8 -q -norc -M lispinit.mem -i tests/tests -x "(cd \"tests/\") (run-all-tests)" |
| 70 |
end |
| 71 |
document run_all_tests |
| 72 |
run the whole test suite |
| 73 |
end |
| 74 |
|
| 75 |
define run_all_tests_parallel |
| 76 |
run -B . -N locale -E utf-8 -q -norc -M lispinit.mem -i tests/tests -x "(cd \"tests/\") (run-all-tests-parallel)" |
| 77 |
end |
| 78 |
document run_all_tests_parallel |
| 79 |
run the whole test suite, each file in its own thread |
| 80 |
end |
| 81 |
|
| 82 |
define run_mod_test |
| 83 |
run -B . -N locale -E 1:1 -q -norc -M $arg0/lispinit.mem -i tests/tests -x "(run-test \"../modules/$arg1/test.tst\" :logname \"$arg1/test.erg\")" |
| 84 |
end |
| 85 |
document run_mod_test |
| 86 |
run_mod_test (base|full) module |
| 87 |
run the tests for the specified module |
| 88 |
end |
| 89 |
|
| 90 |
define run_ansi_tests |
| 91 |
run -B . -N locale -E utf-8 -q -norc -M lispinit.mem -ansi -x "(cd \"ansi-tests/\") (load \"clispload.lsp\") (in-package \"CL-TEST\") (time (regression-test:do-tests))" |
| 92 |
end |
| 93 |
document run_ansi_tests |
| 94 |
run the ANSI test suite |
| 95 |
end |
| 96 |
|
| 97 |
define run_ansi_tests_compiled |
| 98 |
run -B . -N locale -E utf-8 -q -norc -M lispinit.mem -ansi -x "(cd \"ansi-tests/\") (load \"clispload.lsp\") (in-package \"CL-TEST\") (setq regression-test::*compile-tests* t) (time (regression-test:do-tests))" |
| 99 |
end |
| 100 |
document run_ansi_tests_compiled |
| 101 |
run the gcl/ansi-test suite - compiled |
| 102 |
end |
| 103 |
|
| 104 |
define stack |
| 105 |
set $idx = $arg1 |
| 106 |
while $idx >= $arg0 |
| 107 |
echo ***** STACK_ |
| 108 |
output $idx |
| 109 |
echo \ *****\n |
| 110 |
output object_out(STACK[-1-$idx]) |
| 111 |
echo \n |
| 112 |
set $idx = $idx-1 |
| 113 |
end |
| 114 |
end |
| 115 |
document stack |
| 116 |
print the section of STACK |
| 117 |
end |
| 118 |
|
| 119 |
define zbacktrace |
| 120 |
p back_trace_out(0,0) |
| 121 |
end |
| 122 |
document zbacktrace |
| 123 |
print the CLISP backtrace |
| 124 |
end |
| 125 |
|
| 126 |
break funcall |
| 127 |
commands |
| 128 |
xout fun |
| 129 |
end |
| 130 |
disable |
| 131 |
|
| 132 |
break apply |
| 133 |
commands |
| 134 |
xout fun |
| 135 |
end |
| 136 |
disable |
| 137 |
|
| 138 |
break eval |
| 139 |
commands |
| 140 |
xout form |
| 141 |
end |
| 142 |
disable |
| 143 |
|
| 144 |
break interpret_bytecode_ |
| 145 |
commands |
| 146 |
xout closure |
| 147 |
end |
| 148 |
disable |
| 149 |
|
| 150 |
break gar_col |
| 151 |
disable |
| 152 |
|
| 153 |
# not available with MULTITHREAD |
| 154 |
#watch back_trace |
| 155 |
#commands |
| 156 |
# zbacktrace |
| 157 |
# continue |
| 158 |
#end |
| 159 |
|
| 160 |
break register_foreign_inttype |
| 161 |
commands |
| 162 |
silent |
| 163 |
printf "%30s: %d %d\n", name_asciz, size, signed_p |
| 164 |
continue |
| 165 |
end |
| 166 |
|
| 167 |
break main_actions |
| 168 |
commands |
| 169 |
silent |
| 170 |
call check_funtab() |
| 171 |
continue |
| 172 |
end |
| 173 |
|
| 174 |
break error_notreached |
| 175 |
break SP_ueber |
| 176 |
break STACK_ueber |
| 177 |
|
| 178 |
break error |
| 179 |
break prepare_error |
| 180 |
break OS_error |
| 181 |
break OS_file_error |
| 182 |
break OS_filestream_error |
| 183 |
break errno_out_low |
| 184 |
break break_driver |
| 185 |
break signal_and_debug |
| 186 |
|
| 187 |
info break |
| 188 |
|
| 189 |
#ifdef GENERATIONAL_GC |
| 190 |
# This command fails in a build without GENERATIONAL_GC; this is normal. |
| 191 |
break sigsegv_handler_failed |
| 192 |
# You need to execute these two commands by hand, but *only* in a build |
| 193 |
# with GENERATIONAL_GC. Also you need to undo them when the breakpoint |
| 194 |
# at sigsegv_handler_failed has been triggered. |
| 195 |
#handle SIGSEGV noprint nostop |
| 196 |
#handle SIGBUS noprint nostop |
| 197 |
#endif |
| 198 |
|
| 199 |
#ifdef MULTITHREAD |
| 200 |
# you need this when debugging multithreaded CLISP |
| 201 |
# because SIGUSR1 is used by WITH-TIMEOUT |
| 202 |
#handle SIGUSR1 noprint nostop |
| 203 |
#end |
| 204 |
|
| 205 |
# cut and paste when you stop in interpret_bytecode_() |
| 206 |
watch byteptr |
| 207 |
commands |
| 208 |
output byteptr-byteptr_in |
| 209 |
echo \n |
| 210 |
end |