1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-20 03:30:27 +02:00

deprecate turn-on-debugging, it is obsolete

* libguile/script.c (scm_compile_shell_switches): Don't generate calls
  to turn-on-debugging.

* module/ice-9/boot-9.scm (turn-on-debugging): Remove.

* module/ice-9/deprecated.scm (turn-on-debugging): Add deprecated shim.
This commit is contained in:
Andy Wingo 2010-10-01 13:17:44 +02:00
parent ab9c9100d2
commit e2e2631d75
3 changed files with 10 additions and 9 deletions

View file

@ -406,7 +406,6 @@ SCM_SYMBOL (sym_load, "load");
SCM_SYMBOL (sym_eval_string, "eval-string");
SCM_SYMBOL (sym_command_line, "command-line");
SCM_SYMBOL (sym_begin, "begin");
SCM_SYMBOL (sym_turn_on_debugging, "turn-on-debugging");
SCM_SYMBOL (sym_load_user_init, "load-user-init");
SCM_SYMBOL (sym_ice_9, "ice-9");
SCM_SYMBOL (sym_top_repl, "top-repl");
@ -716,11 +715,9 @@ scm_compile_shell_switches (int argc, char **argv)
}
/* If debugging was requested, or we are interactive and debugging
was not explicitly turned off, turn on debugging. */
was not explicitly turned off, use the debug engine. */
if (turn_on_debugging || (interactive && !dont_turn_on_debugging))
{
/* FIXME: backtraces and positions should always be on (?) */
tail = scm_cons (scm_cons (sym_turn_on_debugging, SCM_EOL), tail);
scm_c_set_default_vm_engine_x (SCM_VM_DEBUG_ENGINE);
scm_c_set_vm_engine_x (scm_the_vm (), SCM_VM_DEBUG_ENGINE);
}

View file

@ -1028,10 +1028,6 @@ If there is no handler at all, Guile prints an error and then exits."
;; This is mostly for the internal use of the code generated by
;; scm_compile_shell_switches.
(define (turn-on-debugging)
(debug-enable 'backtrace)
(read-enable 'positions))
(define (load-user-init)
(let* ((home (or (getenv "HOME")
(false-if-exception (passwd:dir (getpwuid (getuid))))

View file

@ -64,7 +64,8 @@
the-last-stack
save-stack
named-module-use!
top-repl))
top-repl
turn-on-debugging))
;;;; Deprecated definitions.
@ -674,3 +675,10 @@ it.")
"Remove it from your code.")
(apply debug-enable (delq 'debug opts)))
(apply debug-enable opts)))))
(define (turn-on-debugging)
(issue-deprecation-warning
"`(turn-on-debugging)' is obsolete and usually has no effect."
"Debugging capabilities are present by default.")
(debug-enable 'backtrace)
(read-enable 'positions))