mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-20 11:40:18 +02:00
remove a number of debug options
* libguile/private-options.h (SCM_BREAKPOINTS_P, SCM_TRACE_P) (SCM_REC_PROCNAMES_P, SCM_BACKTRACE_INDENT, SCM_N_FRAMES) (SCM_BACKTRACE_MAXDEPTH, SCM_DEVAL_P): Remove these internal names. * libguile/eval.c (scm_debug_opts): Remove the corresponding debug options -- breakpoints, trace, procnames, indent, frames, maxdepth, and debug. * libguile/debug.c (scm_debug_options): Remove SCM_N_FRAMES check. * test-suite/lib.scm (with-debugging-evaluator*): * module/scripts/summarize-guile-TODO.scm: * module/statprof.scm (statprof-reset): * module/ice-9/boot-9.scm (turn-on-debugging): Remove useless debug-enable 'debug calls. * module/ice-9/deprecated.scm (debug-enable): As it seems that 'debug is a particulatly common option that we just removed, add a deprecation shim. * doc/ref/api-options.texi (Debugger options): Update the set of debug options.
This commit is contained in:
parent
925c1bae1f
commit
3932bdb3af
9 changed files with 31 additions and 60 deletions
|
@ -546,18 +546,15 @@ Here is the list of print options generated by typing
|
|||
values.
|
||||
|
||||
@smallexample
|
||||
stack 20000 Stack size limit (0 = no check).
|
||||
debug yes Use the debugging evaluator.
|
||||
backtrace no Show backtrace on error.
|
||||
depth 20 Maximal length of printed backtrace.
|
||||
maxdepth 1000 Maximal number of stored backtrace frames.
|
||||
frames 3 Maximum number of tail-recursive frames in backtrace.
|
||||
indent 10 Maximal indentation in backtrace.
|
||||
backwards no Display backtrace in anti-chronological order.
|
||||
procnames yes Record procedure names at definition.
|
||||
trace no *Trace mode.
|
||||
breakpoints no *Check for breakpoints.
|
||||
cheap yes *This option is now obsolete. Setting it has no effect.
|
||||
warn-deprecated no Warn when deprecated features are used.
|
||||
show-file-name #t Show file names and line numbers in backtraces
|
||||
when not `#f'. A value of `base' displays only
|
||||
base names, while `#t' displays full names.
|
||||
stack 1048576 Stack size limit (measured in words; 0 = no check).
|
||||
backtrace yes Show backtrace on error.
|
||||
depth 20 Maximal length of printed backtrace.
|
||||
width 79 Maximal width of backtrace.
|
||||
backwards no Display backtrace in anti-chronological order.
|
||||
@end smallexample
|
||||
|
||||
@subsubheading Stack overflow
|
||||
|
@ -637,17 +634,9 @@ positions yes Record positions of source code expressions.
|
|||
copy no Copy source code expressions.
|
||||
guile> (debug-options 'help)
|
||||
stack 20000 Stack size limit (0 = no check).
|
||||
debug yes Use the debugging evaluator.
|
||||
backtrace no Show backtrace on error.
|
||||
depth 20 Maximal length of printed backtrace.
|
||||
maxdepth 1000 Maximal number of stored backtrace frames.
|
||||
frames 3 Maximum number of tail-recursive frames in backtrace.
|
||||
indent 10 Maximal indentation in backtrace.
|
||||
backwards no Display backtrace in anti-chronological order.
|
||||
procnames yes Record procedure names at definition.
|
||||
trace no *Trace mode.
|
||||
breakpoints no *Check for breakpoints.
|
||||
cheap yes *This option is now obsolete. Setting it has no effect.
|
||||
guile> (read-enable 'case-insensitive)
|
||||
(keywords #f case-insensitive positions)
|
||||
guile> aBc
|
||||
|
|
|
@ -75,11 +75,6 @@ SCM_DEFINE (scm_debug_options, "debug-options-interface", 0, 1, 0,
|
|||
scm_dynwind_critical_section (SCM_BOOL_F);
|
||||
|
||||
ans = scm_options (setting, scm_debug_opts, FUNC_NAME);
|
||||
if (SCM_N_FRAMES < 1)
|
||||
{
|
||||
scm_options (ans, scm_debug_opts, FUNC_NAME);
|
||||
SCM_OUT_OF_RANGE (1, setting);
|
||||
}
|
||||
#ifdef STACK_CHECKING
|
||||
scm_stack_checking_enabled_p = SCM_STACK_CHECKING_P;
|
||||
#endif
|
||||
|
|
|
@ -436,25 +436,11 @@ eval (SCM x, SCM env)
|
|||
}
|
||||
|
||||
scm_t_option scm_debug_opts[] = {
|
||||
{ SCM_OPTION_BOOLEAN, "cheap", 1,
|
||||
"*This option is now obsolete. Setting it has no effect." },
|
||||
{ SCM_OPTION_BOOLEAN, "breakpoints", 0,
|
||||
"*This option is now obsolete. Setting it has no effect." },
|
||||
{ SCM_OPTION_BOOLEAN, "trace", 0,
|
||||
"*This option is now obsolete. Setting it has no effect." },
|
||||
{ SCM_OPTION_BOOLEAN, "procnames", 1,
|
||||
"*This option is now obsolete. Setting it has no effect." },
|
||||
{ SCM_OPTION_BOOLEAN, "backwards", 0,
|
||||
"Display backtrace in anti-chronological order." },
|
||||
{ SCM_OPTION_INTEGER, "width", 79, "Maximal width of backtrace." },
|
||||
{ SCM_OPTION_INTEGER, "indent", 10, "Maximal indentation in backtrace." },
|
||||
{ SCM_OPTION_INTEGER, "frames", 3,
|
||||
"Maximum number of tail-recursive frames in backtrace." },
|
||||
{ SCM_OPTION_INTEGER, "maxdepth", 1000,
|
||||
"Maximal number of stored backtrace frames." },
|
||||
{ SCM_OPTION_INTEGER, "depth", 20, "Maximal length of printed backtrace." },
|
||||
{ SCM_OPTION_BOOLEAN, "backtrace", 0, "Show backtrace on error." },
|
||||
{ SCM_OPTION_BOOLEAN, "debug", 0, "Use the debugging evaluator." },
|
||||
/* This default stack limit will be overridden by debug.c:init_stack_limit(),
|
||||
if we have getrlimit() and the stack limit is not INFINITY. But it is still
|
||||
important, as some systems have both the soft and the hard limits set to
|
||||
|
|
|
@ -30,21 +30,14 @@
|
|||
*/
|
||||
SCM_API scm_t_option scm_debug_opts[];
|
||||
|
||||
#define SCM_BREAKPOINTS_P scm_debug_opts[1].val
|
||||
#define SCM_TRACE_P scm_debug_opts[2].val
|
||||
#define SCM_REC_PROCNAMES_P scm_debug_opts[3].val
|
||||
#define SCM_BACKWARDS_P scm_debug_opts[4].val
|
||||
#define SCM_BACKTRACE_WIDTH scm_debug_opts[5].val
|
||||
#define SCM_BACKTRACE_INDENT scm_debug_opts[6].val
|
||||
#define SCM_N_FRAMES scm_debug_opts[7].val
|
||||
#define SCM_BACKTRACE_MAXDEPTH scm_debug_opts[8].val
|
||||
#define SCM_BACKTRACE_DEPTH scm_debug_opts[9].val
|
||||
#define SCM_BACKTRACE_P scm_debug_opts[10].val
|
||||
#define SCM_DEVAL_P scm_debug_opts[11].val
|
||||
#define SCM_STACK_LIMIT scm_debug_opts[12].val
|
||||
#define SCM_SHOW_FILE_NAME scm_debug_opts[13].val
|
||||
#define SCM_WARN_DEPRECATED scm_debug_opts[14].val
|
||||
#define SCM_N_DEBUG_OPTIONS 15
|
||||
#define SCM_BACKWARDS_P scm_debug_opts[0].val
|
||||
#define SCM_BACKTRACE_WIDTH scm_debug_opts[1].val
|
||||
#define SCM_BACKTRACE_DEPTH scm_debug_opts[2].val
|
||||
#define SCM_BACKTRACE_P scm_debug_opts[3].val
|
||||
#define SCM_STACK_LIMIT scm_debug_opts[4].val
|
||||
#define SCM_SHOW_FILE_NAME scm_debug_opts[5].val
|
||||
#define SCM_WARN_DEPRECATED scm_debug_opts[6].val
|
||||
#define SCM_N_DEBUG_OPTIONS 7
|
||||
|
||||
|
||||
/*
|
||||
|
|
|
@ -1029,7 +1029,6 @@ If there is no handler at all, Guile prints an error and then exits."
|
|||
;; scm_compile_shell_switches.
|
||||
|
||||
(define (turn-on-debugging)
|
||||
(debug-enable 'debug)
|
||||
(debug-enable 'backtrace)
|
||||
(read-enable 'positions))
|
||||
|
||||
|
|
|
@ -663,3 +663,14 @@ it.")
|
|||
(issue-deprecation-warning
|
||||
"`top-repl' has moved to the `(ice-9 top-repl)' module.")
|
||||
((module-ref (resolve-module '(ice-9 top-repl)) 'top-repl)))
|
||||
|
||||
(set! debug-enable
|
||||
(let ((debug-enable debug-enable))
|
||||
(lambda opts
|
||||
(if (memq 'debug opts)
|
||||
(begin
|
||||
(issue-deprecation-warning
|
||||
"`(debug-enable 'debug)' is obsolete and has no effect."
|
||||
"Remove it from your code.")
|
||||
(apply debug-enable (delq 'debug opts)))
|
||||
(apply debug-enable opts)))))
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
;;; summarize-guile-TODO --- Display Guile TODO list in various ways
|
||||
|
||||
;; Copyright (C) 2002, 2006 Free Software Foundation, Inc.
|
||||
;; Copyright (C) 2002, 2006, 2010 Free Software Foundation, Inc.
|
||||
;;
|
||||
;; This program is free software; you can redistribute it and/or
|
||||
;; modify it under the terms of the GNU Lesser General Public License
|
||||
|
@ -63,7 +63,7 @@
|
|||
;; Add support for ORing criteria.
|
||||
|
||||
;;; Code:
|
||||
(debug-enable 'debug 'backtrace)
|
||||
(debug-enable 'backtrace)
|
||||
|
||||
(define-module (scripts summarize-guile-TODO)
|
||||
:use-module (scripts read-text-outline)
|
||||
|
|
|
@ -399,7 +399,6 @@ Enables traps and debugging as necessary."
|
|||
(set! procedure-data (make-hash-table 131))
|
||||
(set! record-full-stacks? (and (pair? full-stacks?) (car full-stacks?)))
|
||||
(set! stacks '())
|
||||
(debug-enable 'debug)
|
||||
(sigaction SIGPROF profile-signal-handler)
|
||||
#t)
|
||||
|
||||
|
|
|
@ -446,8 +446,7 @@
|
|||
(let ((dopts #f))
|
||||
(dynamic-wind
|
||||
(lambda ()
|
||||
(set! dopts (debug-options))
|
||||
(debug-enable 'debug))
|
||||
(set! dopts (debug-options)))
|
||||
thunk
|
||||
(lambda ()
|
||||
(debug-options dopts)))))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue