Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fix sourcing dbg-trace.sh

  • Loading branch information...
commit d7fff0fdbcb6c14dcf885d1459173ad40ce83682 1 parent b06bf71
@rocky authored
View
222 ChangeLog
@@ -1,3 +1,225 @@
+2011-03-13 rocky <rocky@gnu.org>
+
+ * command/eval.sh, lib/help.sh: Regularize indentation and sync with
+ kshdb.
+
+2011-03-05 rocky <rocky@gnu.org>
+
+ * lib/hook.sh: More agressive rm of evalfile
+
+2011-03-05 rocky <rocky@gnu.org>
+
+ Merge branch 'master' of github.com:rocky/zshdb
+
+2011-03-05 rocky <rocky@gnu.org>
+
+ * NEWS, command/shell.sh, dbg-main.sh, dbg-opts.sh,
+ lib/save-restore.sh, lib/shell.sh, test/data/lopts.right: Add
+ --init-file option to read shell script file. Akin to bash's
+ -init-file option.
+
+2011-03-05 rocky <rocky@gnu.org>
+
+ * dbg-opts.sh: Update copyright date
+
+2011-03-04 rocky <rocky@gnu.org>
+
+ * command/Makefile.am, command/export.sh, configure.ac,
+ lib/break.sh, lib/fns.sh, lib/hook.sh, lib/journal.sh,
+ lib/setshow.sh, lib/validate.sh, test/data/Makefile.am,
+ test/data/export.cmd, test/data/export.right,
+ test/integration/.gitignore, test/integration/test-export.in: Fix
+ bug in setting breakpoint in subshell; Add export command
+
+2011-03-04 rocky <rocky@gnu.org>
+
+ * test/integration/Makefile.am: Fix bug in setting breakpoint in
+ subshell; Add export command
+
+2011-03-03 rocky <rocky@gnu.org>
+
+ * command/info_sub/brkpts.sh: Better sync with kshdb and bashdb.
+ Still a little off in breakpoints.
+
+2011-03-03 rocky <rocky@gnu.org>
+
+ * command/display.sh, command/info.sh, command/info_sub/display.sh:
+ Sync with kshdb.
+
+2011-03-02 rocky <rocky@gnu.org>
+
+ * lib/display.sh: Sync with kshdb
+
+2011-03-02 rocky <rocky@gnu.org>
+
+ * Makefile.am: Administrivia
+
+2011-03-02 rocky <rocky@gnu.org>
+
+ Merge branch 'master' of github.com:rocky/zshdb
+
+2011-03-02 rocky <rocky@gnu.org>
+
+ * AUTHORS, command/Makefile.am: Forgot to install display and
+ undisplay
+
+2011-03-01 rocky <rocky@gnu.org>
+
+ * Makefile.am, command/shell.sh, data/shell.sh, lib/shell.sh: Sync
+ with bashdb
+
+2011-02-28 rocky <rocky@gnu.org>
+
+ * Makefile.am, command/Makefile.am, data/Makefile.am,
+ lib/Makefile.am, test/Makefile.am, test/unit/Makefile.am:
+ 'clean'target should remove patch' *.{orig,rej}
+
+2011-02-28 rocky <rocky@gnu.org>
+
+ * Makefile.am, command/shell.sh, configure.ac, data/.gitignore,
+ data/Makefile.am, data/shell.sh, lib/fns.sh, lib/shell.sh,
+ test/unit/.gitignore: Add ability to save variables inside nested
+ shell. Suggestion for code which doesn't use eval (but is very
+ zsh-specific) suggested by Bart Schaefer.
+
+2011-02-28 rocky <rocky@gnu.org>
+
+ * lib/fns.sh: Sync with bashdb
+
+2011-02-28 rocky <rocky@gnu.org>
+
+ * command/eval.sh, lib/fns.sh: in "eval?" extract expression in
+ "case", and echo that.
+
+2011-02-27 rocky <rocky@gnu.org>
+
+ * command/shell.sh, lib/shell.sh, test/unit/test-lib-shell.sh.in:
+ Revise how exports work to be more reliable. Thanks to Bart Schaefer
+ for the suggestion and pointer to the parameter module
+
+2011-02-27 rocky <rocky@gnu.org>
+
+ * test/data/frame.right, test/unit/test-eval.sh.in: Correct unit
+ tests expectations
+
+2011-02-27 rocky <rocky@gnu.org>
+
+ * configure.ac, test/unit/Makefile.am,
+ test/unit/test-lib-shell.sh.in: Add unit test for recent shell lib
+ stuff
+
+2011-02-27 rocky <rocky@gnu.org>
+
+ * command/Makefile.am, command/shell.sh, lib/Makefile.am,
+ lib/fns.sh, lib/shell.sh: Add more proper filtering of typeset -p
+ for debugger shell command.
+
+2011-02-27 rocky <rocky@gnu.org>
+
+ * dbg-pre.sh: A separator in the tempfiles looks a little nicer
+
+2011-02-26 rocky <rocky@gnu.org>
+
+ * command/shell.sh: Start shell command.
+
+2011-02-25 rocky <rocky@gnu.org>
+
+ * command/eval.sh, zshdb.in: Update eval help
+
+2011-02-25 rocky <rocky@gnu.org>
+
+ * command/eval.sh, lib/display.sh, lib/processor.sh,
+ test/data/action.right, test/data/bug-args.cmd,
+ test/data/bug-args.right, test/data/bug-ksharrays.right,
+ test/data/bugIFS.cmd, test/data/bugIFS.right, test/data/multi1.cmd,
+ test/data/multi1.right, test/data/multi2.cmd,
+ test/data/multi2.right, test/data/multi3.cmd,
+ test/data/multi3.right, test/data/setshow.right,
+ test/data/subshell.right: Show return code in eval. "pr" is an alias
+ for "print" no longer "p". This matches current Ruby abbreviations.
+
+
+2011-02-25 rocky <rocky@gnu.org>
+
+ * command/eval.sh, configure.ac, lib/filecache.sh, lib/fns.sh,
+ lib/processor.sh, test/data/list.right, test/unit/Makefile.am,
+ test/unit/test-eval.sh.in: Add eval?
+
+2011-02-19 rocky <rocky@gnu.org>
+
+ * command/eval.sh, command/quit.sh: Add q! alias for quit. Show eval
+ source text and note set autoeval in help
+
+2011-02-19 rocky <rocky@gnu.org>
+
+ * command/eval.sh: eval command with no args eval's the current
+ source line. YAY!
+
+2011-02-09 rocky <rocky@gnu.org>
+
+ * command/down.sh, command/frame.sh, command/up.sh,
+ lib/Makefile.am, lib/filecache.sh, lib/msg.sh, lib/validate.sh,
+ test/data/setshow.right, test/unit/test-msg.sh.in,
+ test/unit/test-validate.sh.in: Parameter checkin on up/down/frame.
+ chmod +x for Python highlight program. Sync with bashdb.
+
+2011-02-09 rocky <rocky@gnu.org>
+
+ Merge branch 'master' of github.com:rocky/zshdb
+
+2011-02-09 rocky <rocky@gnu.org>
+
+ * lib/Makefile.am: Add highlight wrapper to install/distribution
+
+2011-02-09 rocky <rocky@gnu.org>
+
+ Merge branch 'master' of github.com:rocky/zshdb
+
+2011-02-09 rocky <rocky@gnu.org>
+
+ * lib/filecache.sh, lib/gdb.sh, lib/term-highlight.py: Customize
+ colors for source terminal output. Start to work towards making this
+ more customizable
+
+2011-02-07 rocky <rocky@gnu.org>
+
+ * lib/filecache.sh: Remove duplicate statement.
+
+2011-02-07 rocky <rocky@gnu.org>
+
+ * command/show_sub/highlight.sh, dbg-opts.sh, getopts_long.sh,
+ lib/file.sh, lib/msg.sh, test/data/lopts.right: Add --highlight and
+ --no-highlight options. Update getopts_long.sh
+
+2011-02-07 rocky <rocky@gnu.org>
+
+ * lib/filecache.sh: Got off by one in source line trying merge bash
+ temp pygmentize code
+
+2011-02-07 rocky <rocky@gnu.org>
+
+ * command/set_sub/highlight.sh, command/show_sub/highlight.sh,
+ lib/filecache.sh, lib/gdb.sh: Add syntax highlighting via pygmentize
+
+
+2011-02-06 rocky <rocky@gnu.org>
+
+ * command/set.sh, command/set_sub/Makefile.am,
+ command/set_sub/annotate.sh, command/set_sub/args.sh,
+ command/set_sub/autolist.sh, command/set_sub/editing.sh,
+ command/set_sub/history.sh, command/set_sub/linewidth.sh,
+ command/set_sub/listsize.sh, command/set_sub/showcommand.sh,
+ command/set_sub/width.sh, command/show.sh: Move subcommand dispatch
+ into hash in set commands. Add help although not used yet.
+
+2011-02-06 rocky <rocky@gnu.org>
+
+ * ChangeLog, command/show.sh, command/show_sub/alias.sh,
+ command/show_sub/copying.sh, command/show_sub/debugging.sh,
+ command/show_sub/editing.sh, lib/help.sh: Start dynamic subcommands
+ handling via associative arrays like we did for commands. Sync with
+ bashdb
+
2011-01-16 rocky <rocky@gnu.org>
* command/continue.sh, dbg-trace.sh.in, lib/dbg-call.sh,
View
1  NEWS
@@ -11,6 +11,7 @@ Version 0.10 - Ides of March
inside the interactive shell)
- ability to save values from inside a subshell to the outer shell
(debugger command "export")
+- add debugger "display" and "undisplay" commands
- add --init-file (akin to same option in bash) to have bash code
sourced
View
3  command/Makefile.am
@@ -20,8 +20,9 @@ pkgdata_DATA = \
handle.sh \
help.sh \
info.sh \
- list.sh \
kill.sh \
+ list.sh \
+ next.sh \
quit.sh \
return.sh \
run.sh \
View
70 command/next.sh
@@ -0,0 +1,70 @@
+# -*- shell-script -*-
+# gdb-like "next" (step over) commmand.
+#
+# Copyright (C) 2008, 2010 Rocky Bernstein rocky@gnu.org
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation; either version 2, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; see the file COPYING. If not, write to
+# the Free Software Foundation, 59 Temple Place, Suite 330, Boston,
+# MA 02111 USA.
+
+# Sets whether or not to display command to be executed in debugger prompt.
+# If yes, always show. If auto, show only if the same line is to be run
+# but the command is different.
+
+_Dbg_help_add next \
+"next [COUNT] -- Single step an statement skipping functions.
+
+If COUNT is given, stepping occurs that many times before
+stopping. Otherwise COUNT is one. COUNT an be an arithmetic
+expression.
+
+Functions and source'd files are not traced. This is in contrast to
+\"step\". See also \"skip\"." 1
+
+# Next command
+# $1 is command next+, next-, or next
+# $2 is an optional additional count.
+_Dbg_do_next() {
+
+ _Dbg_not_running && return 1
+
+ _Dbg_last_cmd="$_Dbg_cmd"
+ _Dbg_last_next_step_cmd="$_Dbg_cmd"
+ _Dbg_last_next_step_args="$@"
+
+ typeset count=${1:-1}
+
+ case "${_Dbg_last_next_step_cmd[-1,-1]}" in
+ '+' ) _Dbg_step_force=1 ;;
+ '-' ) _Dbg_step_force=0 ;;
+ '' ) _Dbg_step_force=$_Dbg_set_different ;;
+ * ) ;;
+ esac
+
+ if [[ $count == [0-9]* ]] ; then
+ _Dbg_step_ignore=${count:-1}
+ else
+ _Dbg_errmsg "Argument ($count) should be a number or nothing."
+ _Dbg_step_ignore=1
+ return 0
+ fi
+
+ _Dbg_write_journal_eval "_Dbg_return_level=${#_Dbg_frame_stack[@]}"
+ _Dbg_write_journal "_Dbg_step_ignore=$_Dbg_step_ignore"
+ _Dbg_write_journal "_Dbg_step_force=$_Dbg_step_force"
+ _Dbg_continue_rc=0
+ return 0
+}
+
+_Dbg_alias_add 'n' 'next'
View
6 command/set.sh
@@ -39,12 +39,12 @@ for _Dbg_file in ${_Dbg_libdir}/command/set_sub/*.sh ; do
done
_Dbg_do_set() {
- _Dbg_do_set_internal $@
+ _Dbg_do_set_internal "$@"
return 0
}
_Dbg_do_set_internal() {
- typeset set_cmd=$1
+ typeset set_cmd="$1"
typeset rc
if [[ $set_cmd == '' ]] ; then
_Dbg_msg "Argument required (expression to compute)."
@@ -72,7 +72,7 @@ _Dbg_do_set_internal() {
_Dbg_set_onoff "$1" 'different'
;;
inferior-tty )
- _Dbg_set_tty $@
+ _Dbg_set_tty "$@"
;;
lo | log | logg | loggi | loggin | logging )
_Dbg_cmd_set_logging $@
View
4 command/shell.sh
@@ -103,9 +103,7 @@ _Dbg_do_shell() {
# Set prompt in new shell
echo "PS1='${_Dbg_debugger_name} $ '" >>$_Dbg_shell_temp_profile
-
- export ZDOTDIR=$_Dbg_tmpdir
- $shell -o TYPESET_SILENT $shell_opts
+ ZDOTDIR=$_Dbg_tmpdir $shell -o TYPESET_SILENT $shell_opts
rc=$?
_Dbg_restore_from_nested_shell
# FIXME: put in _Dbg_restore_from_nested_shell
View
2  configure.ac
@@ -1,7 +1,7 @@
dnl Configure script for Shell debugger
define(DEBUGGER, zshdb)
define(POSIXSHELL, zsh)
-AC_INIT([zshdb],[0.07.dev],[rocky@gnu.org])
+AC_INIT([zshdb],[0.07],[rocky@gnu.org])
AM_MAINTAINER_MODE
AM_INIT_AUTOMAKE([no-define])
View
2  dbg-trace.sh.in
@@ -32,7 +32,7 @@ typeset _Dbg_shell='@SH_PROG@'
# Equivalent to
typeset _Dbg_shell_name=${_Dbg_shell##*/}
-typeset -a _Dbg_script_args=("$@")
+typeset -a _Dbg_script_args; _Dbg_script_args=("$@")
# Original $0. Note we can't set this in an include.
typeset _Dbg_orig_0=$0
View
2  lib/processor.sh
@@ -156,7 +156,7 @@ _Dbg_onecmd() {
else
_Dbg_cmd=$1
shift
- args=$@
+ args="$@"
fi
typeset _Dbg_orig_cmd;
_Dbg_orig_cmd=$_Dbg_cmd
View
2  test/unit/test-eval.sh.in
@@ -32,7 +32,7 @@ test_eval_subst()
typeset -i i
for (( i=0 ; i<${#expected}; i++ )) ; do
_Dbg_eval_extract_condition "${texts[i]}"
- assertEquals "${expected[i]}" "$extracted"
+ assertEquals "$extracted" "${expected[i]}"
done
}
Please sign in to comment.
Something went wrong with that request. Please try again.