Skip to content
This repository
Browse code

Fix sourcing dbg-trace.sh

  • Loading branch information...
commit d7fff0fdbcb6c14dcf885d1459173ad40ce83682 1 parent b06bf71
R. Bernstein authored
222 ChangeLog
... ... @@ -1,3 +1,225 @@
  1 +2011-03-13 rocky <rocky@gnu.org>
  2 +
  3 + * command/eval.sh, lib/help.sh: Regularize indentation and sync with
  4 + kshdb.
  5 +
  6 +2011-03-05 rocky <rocky@gnu.org>
  7 +
  8 + * lib/hook.sh: More agressive rm of evalfile
  9 +
  10 +2011-03-05 rocky <rocky@gnu.org>
  11 +
  12 + Merge branch 'master' of github.com:rocky/zshdb
  13 +
  14 +2011-03-05 rocky <rocky@gnu.org>
  15 +
  16 + * NEWS, command/shell.sh, dbg-main.sh, dbg-opts.sh,
  17 + lib/save-restore.sh, lib/shell.sh, test/data/lopts.right: Add
  18 + --init-file option to read shell script file. Akin to bash's
  19 + -init-file option.
  20 +
  21 +2011-03-05 rocky <rocky@gnu.org>
  22 +
  23 + * dbg-opts.sh: Update copyright date
  24 +
  25 +2011-03-04 rocky <rocky@gnu.org>
  26 +
  27 + * command/Makefile.am, command/export.sh, configure.ac,
  28 + lib/break.sh, lib/fns.sh, lib/hook.sh, lib/journal.sh,
  29 + lib/setshow.sh, lib/validate.sh, test/data/Makefile.am,
  30 + test/data/export.cmd, test/data/export.right,
  31 + test/integration/.gitignore, test/integration/test-export.in: Fix
  32 + bug in setting breakpoint in subshell; Add export command
  33 +
  34 +2011-03-04 rocky <rocky@gnu.org>
  35 +
  36 + * test/integration/Makefile.am: Fix bug in setting breakpoint in
  37 + subshell; Add export command
  38 +
  39 +2011-03-03 rocky <rocky@gnu.org>
  40 +
  41 + * command/info_sub/brkpts.sh: Better sync with kshdb and bashdb.
  42 + Still a little off in breakpoints.
  43 +
  44 +2011-03-03 rocky <rocky@gnu.org>
  45 +
  46 + * command/display.sh, command/info.sh, command/info_sub/display.sh:
  47 + Sync with kshdb.
  48 +
  49 +2011-03-02 rocky <rocky@gnu.org>
  50 +
  51 + * lib/display.sh: Sync with kshdb
  52 +
  53 +2011-03-02 rocky <rocky@gnu.org>
  54 +
  55 + * Makefile.am: Administrivia
  56 +
  57 +2011-03-02 rocky <rocky@gnu.org>
  58 +
  59 + Merge branch 'master' of github.com:rocky/zshdb
  60 +
  61 +2011-03-02 rocky <rocky@gnu.org>
  62 +
  63 + * AUTHORS, command/Makefile.am: Forgot to install display and
  64 + undisplay
  65 +
  66 +2011-03-01 rocky <rocky@gnu.org>
  67 +
  68 + * Makefile.am, command/shell.sh, data/shell.sh, lib/shell.sh: Sync
  69 + with bashdb
  70 +
  71 +2011-02-28 rocky <rocky@gnu.org>
  72 +
  73 + * Makefile.am, command/Makefile.am, data/Makefile.am,
  74 + lib/Makefile.am, test/Makefile.am, test/unit/Makefile.am:
  75 + 'clean'target should remove patch' *.{orig,rej}
  76 +
  77 +2011-02-28 rocky <rocky@gnu.org>
  78 +
  79 + * Makefile.am, command/shell.sh, configure.ac, data/.gitignore,
  80 + data/Makefile.am, data/shell.sh, lib/fns.sh, lib/shell.sh,
  81 + test/unit/.gitignore: Add ability to save variables inside nested
  82 + shell. Suggestion for code which doesn't use eval (but is very
  83 + zsh-specific) suggested by Bart Schaefer.
  84 +
  85 +2011-02-28 rocky <rocky@gnu.org>
  86 +
  87 + * lib/fns.sh: Sync with bashdb
  88 +
  89 +2011-02-28 rocky <rocky@gnu.org>
  90 +
  91 + * command/eval.sh, lib/fns.sh: in "eval?" extract expression in
  92 + "case", and echo that.
  93 +
  94 +2011-02-27 rocky <rocky@gnu.org>
  95 +
  96 + * command/shell.sh, lib/shell.sh, test/unit/test-lib-shell.sh.in:
  97 + Revise how exports work to be more reliable. Thanks to Bart Schaefer
  98 + for the suggestion and pointer to the parameter module
  99 +
  100 +2011-02-27 rocky <rocky@gnu.org>
  101 +
  102 + * test/data/frame.right, test/unit/test-eval.sh.in: Correct unit
  103 + tests expectations
  104 +
  105 +2011-02-27 rocky <rocky@gnu.org>
  106 +
  107 + * configure.ac, test/unit/Makefile.am,
  108 + test/unit/test-lib-shell.sh.in: Add unit test for recent shell lib
  109 + stuff
  110 +
  111 +2011-02-27 rocky <rocky@gnu.org>
  112 +
  113 + * command/Makefile.am, command/shell.sh, lib/Makefile.am,
  114 + lib/fns.sh, lib/shell.sh: Add more proper filtering of typeset -p
  115 + for debugger shell command.
  116 +
  117 +2011-02-27 rocky <rocky@gnu.org>
  118 +
  119 + * dbg-pre.sh: A separator in the tempfiles looks a little nicer
  120 +
  121 +2011-02-26 rocky <rocky@gnu.org>
  122 +
  123 + * command/shell.sh: Start shell command.
  124 +
  125 +2011-02-25 rocky <rocky@gnu.org>
  126 +
  127 + * command/eval.sh, zshdb.in: Update eval help
  128 +
  129 +2011-02-25 rocky <rocky@gnu.org>
  130 +
  131 + * command/eval.sh, lib/display.sh, lib/processor.sh,
  132 + test/data/action.right, test/data/bug-args.cmd,
  133 + test/data/bug-args.right, test/data/bug-ksharrays.right,
  134 + test/data/bugIFS.cmd, test/data/bugIFS.right, test/data/multi1.cmd,
  135 + test/data/multi1.right, test/data/multi2.cmd,
  136 + test/data/multi2.right, test/data/multi3.cmd,
  137 + test/data/multi3.right, test/data/setshow.right,
  138 + test/data/subshell.right: Show return code in eval. "pr" is an alias
  139 + for "print" no longer "p". This matches current Ruby abbreviations.
  140 +
  141 +
  142 +2011-02-25 rocky <rocky@gnu.org>
  143 +
  144 + * command/eval.sh, configure.ac, lib/filecache.sh, lib/fns.sh,
  145 + lib/processor.sh, test/data/list.right, test/unit/Makefile.am,
  146 + test/unit/test-eval.sh.in: Add eval?
  147 +
  148 +2011-02-19 rocky <rocky@gnu.org>
  149 +
  150 + * command/eval.sh, command/quit.sh: Add q! alias for quit. Show eval
  151 + source text and note set autoeval in help
  152 +
  153 +2011-02-19 rocky <rocky@gnu.org>
  154 +
  155 + * command/eval.sh: eval command with no args eval's the current
  156 + source line. YAY!
  157 +
  158 +2011-02-09 rocky <rocky@gnu.org>
  159 +
  160 + * command/down.sh, command/frame.sh, command/up.sh,
  161 + lib/Makefile.am, lib/filecache.sh, lib/msg.sh, lib/validate.sh,
  162 + test/data/setshow.right, test/unit/test-msg.sh.in,
  163 + test/unit/test-validate.sh.in: Parameter checkin on up/down/frame.
  164 + chmod +x for Python highlight program. Sync with bashdb.
  165 +
  166 +2011-02-09 rocky <rocky@gnu.org>
  167 +
  168 + Merge branch 'master' of github.com:rocky/zshdb
  169 +
  170 +2011-02-09 rocky <rocky@gnu.org>
  171 +
  172 + * lib/Makefile.am: Add highlight wrapper to install/distribution
  173 +
  174 +2011-02-09 rocky <rocky@gnu.org>
  175 +
  176 + Merge branch 'master' of github.com:rocky/zshdb
  177 +
  178 +2011-02-09 rocky <rocky@gnu.org>
  179 +
  180 + * lib/filecache.sh, lib/gdb.sh, lib/term-highlight.py: Customize
  181 + colors for source terminal output. Start to work towards making this
  182 + more customizable
  183 +
  184 +2011-02-07 rocky <rocky@gnu.org>
  185 +
  186 + * lib/filecache.sh: Remove duplicate statement.
  187 +
  188 +2011-02-07 rocky <rocky@gnu.org>
  189 +
  190 + * command/show_sub/highlight.sh, dbg-opts.sh, getopts_long.sh,
  191 + lib/file.sh, lib/msg.sh, test/data/lopts.right: Add --highlight and
  192 + --no-highlight options. Update getopts_long.sh
  193 +
  194 +2011-02-07 rocky <rocky@gnu.org>
  195 +
  196 + * lib/filecache.sh: Got off by one in source line trying merge bash
  197 + temp pygmentize code
  198 +
  199 +2011-02-07 rocky <rocky@gnu.org>
  200 +
  201 + * command/set_sub/highlight.sh, command/show_sub/highlight.sh,
  202 + lib/filecache.sh, lib/gdb.sh: Add syntax highlighting via pygmentize
  203 +
  204 +
  205 +2011-02-06 rocky <rocky@gnu.org>
  206 +
  207 + * command/set.sh, command/set_sub/Makefile.am,
  208 + command/set_sub/annotate.sh, command/set_sub/args.sh,
  209 + command/set_sub/autolist.sh, command/set_sub/editing.sh,
  210 + command/set_sub/history.sh, command/set_sub/linewidth.sh,
  211 + command/set_sub/listsize.sh, command/set_sub/showcommand.sh,
  212 + command/set_sub/width.sh, command/show.sh: Move subcommand dispatch
  213 + into hash in set commands. Add help although not used yet.
  214 +
  215 +2011-02-06 rocky <rocky@gnu.org>
  216 +
  217 + * ChangeLog, command/show.sh, command/show_sub/alias.sh,
  218 + command/show_sub/copying.sh, command/show_sub/debugging.sh,
  219 + command/show_sub/editing.sh, lib/help.sh: Start dynamic subcommands
  220 + handling via associative arrays like we did for commands. Sync with
  221 + bashdb
  222 +
1 223 2011-01-16 rocky <rocky@gnu.org>
2 224
3 225 * command/continue.sh, dbg-trace.sh.in, lib/dbg-call.sh,
1  NEWS
@@ -11,6 +11,7 @@ Version 0.10 - Ides of March
11 11 inside the interactive shell)
12 12 - ability to save values from inside a subshell to the outer shell
13 13 (debugger command "export")
  14 +- add debugger "display" and "undisplay" commands
14 15 - add --init-file (akin to same option in bash) to have bash code
15 16 sourced
16 17
3  command/Makefile.am
@@ -20,8 +20,9 @@ pkgdata_DATA = \
20 20 handle.sh \
21 21 help.sh \
22 22 info.sh \
23   - list.sh \
24 23 kill.sh \
  24 + list.sh \
  25 + next.sh \
25 26 quit.sh \
26 27 return.sh \
27 28 run.sh \
70 command/next.sh
... ... @@ -0,0 +1,70 @@
  1 +# -*- shell-script -*-
  2 +# gdb-like "next" (step over) commmand.
  3 +#
  4 +# Copyright (C) 2008, 2010 Rocky Bernstein rocky@gnu.org
  5 +#
  6 +# This program is free software; you can redistribute it and/or
  7 +# modify it under the terms of the GNU General Public License as
  8 +# published by the Free Software Foundation; either version 2, or
  9 +# (at your option) any later version.
  10 +#
  11 +# This program is distributed in the hope that it will be useful,
  12 +# but WITHOUT ANY WARRANTY; without even the implied warranty of
  13 +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  14 +# General Public License for more details.
  15 +#
  16 +# You should have received a copy of the GNU General Public License
  17 +# along with this program; see the file COPYING. If not, write to
  18 +# the Free Software Foundation, 59 Temple Place, Suite 330, Boston,
  19 +# MA 02111 USA.
  20 +
  21 +# Sets whether or not to display command to be executed in debugger prompt.
  22 +# If yes, always show. If auto, show only if the same line is to be run
  23 +# but the command is different.
  24 +
  25 +_Dbg_help_add next \
  26 +"next [COUNT] -- Single step an statement skipping functions.
  27 +
  28 +If COUNT is given, stepping occurs that many times before
  29 +stopping. Otherwise COUNT is one. COUNT an be an arithmetic
  30 +expression.
  31 +
  32 +Functions and source'd files are not traced. This is in contrast to
  33 +\"step\". See also \"skip\"." 1
  34 +
  35 +# Next command
  36 +# $1 is command next+, next-, or next
  37 +# $2 is an optional additional count.
  38 +_Dbg_do_next() {
  39 +
  40 + _Dbg_not_running && return 1
  41 +
  42 + _Dbg_last_cmd="$_Dbg_cmd"
  43 + _Dbg_last_next_step_cmd="$_Dbg_cmd"
  44 + _Dbg_last_next_step_args="$@"
  45 +
  46 + typeset count=${1:-1}
  47 +
  48 + case "${_Dbg_last_next_step_cmd[-1,-1]}" in
  49 + '+' ) _Dbg_step_force=1 ;;
  50 + '-' ) _Dbg_step_force=0 ;;
  51 + '' ) _Dbg_step_force=$_Dbg_set_different ;;
  52 + * ) ;;
  53 + esac
  54 +
  55 + if [[ $count == [0-9]* ]] ; then
  56 + _Dbg_step_ignore=${count:-1}
  57 + else
  58 + _Dbg_errmsg "Argument ($count) should be a number or nothing."
  59 + _Dbg_step_ignore=1
  60 + return 0
  61 + fi
  62 +
  63 + _Dbg_write_journal_eval "_Dbg_return_level=${#_Dbg_frame_stack[@]}"
  64 + _Dbg_write_journal "_Dbg_step_ignore=$_Dbg_step_ignore"
  65 + _Dbg_write_journal "_Dbg_step_force=$_Dbg_step_force"
  66 + _Dbg_continue_rc=0
  67 + return 0
  68 +}
  69 +
  70 +_Dbg_alias_add 'n' 'next'
6 command/set.sh
@@ -39,12 +39,12 @@ for _Dbg_file in ${_Dbg_libdir}/command/set_sub/*.sh ; do
39 39 done
40 40
41 41 _Dbg_do_set() {
42   - _Dbg_do_set_internal $@
  42 + _Dbg_do_set_internal "$@"
43 43 return 0
44 44 }
45 45
46 46 _Dbg_do_set_internal() {
47   - typeset set_cmd=$1
  47 + typeset set_cmd="$1"
48 48 typeset rc
49 49 if [[ $set_cmd == '' ]] ; then
50 50 _Dbg_msg "Argument required (expression to compute)."
@@ -72,7 +72,7 @@ _Dbg_do_set_internal() {
72 72 _Dbg_set_onoff "$1" 'different'
73 73 ;;
74 74 inferior-tty )
75   - _Dbg_set_tty $@
  75 + _Dbg_set_tty "$@"
76 76 ;;
77 77 lo | log | logg | loggi | loggin | logging )
78 78 _Dbg_cmd_set_logging $@
4 command/shell.sh
@@ -103,9 +103,7 @@ _Dbg_do_shell() {
103 103
104 104 # Set prompt in new shell
105 105 echo "PS1='${_Dbg_debugger_name} $ '" >>$_Dbg_shell_temp_profile
106   -
107   - export ZDOTDIR=$_Dbg_tmpdir
108   - $shell -o TYPESET_SILENT $shell_opts
  106 + ZDOTDIR=$_Dbg_tmpdir $shell -o TYPESET_SILENT $shell_opts
109 107 rc=$?
110 108 _Dbg_restore_from_nested_shell
111 109 # FIXME: put in _Dbg_restore_from_nested_shell
2  configure.ac
... ... @@ -1,7 +1,7 @@
1 1 dnl Configure script for Shell debugger
2 2 define(DEBUGGER, zshdb)
3 3 define(POSIXSHELL, zsh)
4   -AC_INIT([zshdb],[0.07.dev],[rocky@gnu.org])
  4 +AC_INIT([zshdb],[0.07],[rocky@gnu.org])
5 5 AM_MAINTAINER_MODE
6 6 AM_INIT_AUTOMAKE([no-define])
7 7
2  dbg-trace.sh.in
@@ -32,7 +32,7 @@ typeset _Dbg_shell='@SH_PROG@'
32 32 # Equivalent to
33 33 typeset _Dbg_shell_name=${_Dbg_shell##*/}
34 34
35   -typeset -a _Dbg_script_args=("$@")
  35 +typeset -a _Dbg_script_args; _Dbg_script_args=("$@")
36 36
37 37 # Original $0. Note we can't set this in an include.
38 38 typeset _Dbg_orig_0=$0
2  lib/processor.sh
@@ -156,7 +156,7 @@ _Dbg_onecmd() {
156 156 else
157 157 _Dbg_cmd=$1
158 158 shift
159   - args=$@
  159 + args="$@"
160 160 fi
161 161 typeset _Dbg_orig_cmd;
162 162 _Dbg_orig_cmd=$_Dbg_cmd
2  test/unit/test-eval.sh.in
@@ -32,7 +32,7 @@ test_eval_subst()
32 32 typeset -i i
33 33 for (( i=0 ; i<${#expected}; i++ )) ; do
34 34 _Dbg_eval_extract_condition "${texts[i]}"
35   - assertEquals "${expected[i]}" "$extracted"
  35 + assertEquals "$extracted" "${expected[i]}"
36 36 done
37 37 }
38 38

0 comments on commit d7fff0f

Please sign in to comment.
Something went wrong with that request. Please try again.