diff --git a/doc_src/cmds/fish.rst b/doc_src/cmds/fish.rst index 658c8a0d3..01929d863 100644 --- a/doc_src/cmds/fish.rst +++ b/doc_src/cmds/fish.rst @@ -41,8 +41,6 @@ The following options are available: - ``-v`` or ``--version`` display version and exit -- ``-D`` or ``--debug-stack-frames=DEBUG_LEVEL`` specify how many stack frames to display when debug messages are written. The default is zero. A value of 3 or 4 is usually sufficient to gain insight into how a given debug call was reached but you can specify a value up to 128. - - ``-f`` or ``--features=FEATURES`` enables one or more :ref:`feature flags ` (separated by a comma). These are how fish stages changes that might break scripts. The fish exit status is generally the :ref:`exit status of the last foreground command `. diff --git a/doc_src/cmds/fish_indent.rst b/doc_src/cmds/fish_indent.rst index 301e7904f..7572d6358 100644 --- a/doc_src/cmds/fish_indent.rst +++ b/doc_src/cmds/fish_indent.rst @@ -32,6 +32,4 @@ The following options are available: - ``-d`` or ``--debug-level=DEBUG_LEVEL`` enables debug output and specifies a verbosity level. Defaults to 0. -- ``-D`` or ``--debug-stack-frames=DEBUG_LEVEL`` specify how many stack frames to display when debug messages are written. The default is zero. A value of 3 or 4 is usually sufficient to gain insight into how a given debug call was reached but you can specify a value up to 128. - - ``--dump-parse-tree`` dumps information about the parsed statements to stderr. This is likely to be of interest only to people working on the fish source code. diff --git a/src/common.cpp b/src/common.cpp index ce797f7c3..32fb44b24 100644 --- a/src/common.cpp +++ b/src/common.cpp @@ -87,10 +87,6 @@ bool g_profiling_active = false; const wchar_t *program_name; std::atomic debug_level{1}; // default maximum debug output level (errors and warnings) -static relaxed_atomic_t debug_stack_frames{0}; -void set_debug_stack_frames(int v) { debug_stack_frames = v; } -int get_debug_stack_frames() { return debug_stack_frames; } - /// Be able to restore the term's foreground process group. /// This is set during startup and not modified after. static relaxed_atomic_t initial_fg_process_group{-1}; diff --git a/src/common.h b/src/common.h index 88abd478d..b97ebe976 100644 --- a/src/common.h +++ b/src/common.h @@ -187,10 +187,6 @@ int get_omitted_newline_width(); /// Character used for the silent mode of the read command wchar_t get_obfuscation_read_char(); -/// How many stack frames to show when a debug() call is made. -int get_debug_stack_frames(); -void set_debug_stack_frames(int); - /// Profiling flag. True if commands should be profiled. extern bool g_profiling_active; diff --git a/src/fish.cpp b/src/fish.cpp index ab2b8a00b..9e494788d 100644 --- a/src/fish.cpp +++ b/src/fish.cpp @@ -366,19 +366,8 @@ static int fish_parse_opt(int argc, char **argv, fish_cmd_opts_t *opts) { exit(0); } case 'D': { - char *end; - long tmp; - - errno = 0; - tmp = strtol(optarg, &end, 10); - - if (tmp > 0 && tmp <= 128 && !*end && !errno) { - set_debug_stack_frames(static_cast(tmp)); - } else { - std::fwprintf(stderr, _(L"Invalid value '%s' for debug-stack-frames flag"), - optarg); - exit(1); - } + // TODO: Option is currently useless. + // Either remove it or make it work with FLOG. break; } default: { diff --git a/src/fish_indent.cpp b/src/fish_indent.cpp index d7af40036..faa4729c6 100644 --- a/src/fish_indent.cpp +++ b/src/fish_indent.cpp @@ -928,19 +928,8 @@ int main(int argc, char *argv[]) { break; } case 'D': { - char *end; - long tmp; - - errno = 0; - tmp = strtol(optarg, &end, 10); - - if (tmp > 0 && tmp <= 128 && !*end && !errno) { - set_debug_stack_frames(static_cast(tmp)); - } else { - std::fwprintf(stderr, _(L"Invalid value '%s' for debug-stack-frames flag"), - optarg); - exit(1); - } + // TODO: Option is currently useless. + // Either remove it or make it work with FLOG. break; } default: {