File tree Expand file tree Collapse file tree 3 files changed +9
-12
lines changed Expand file tree Collapse file tree 3 files changed +9
-12
lines changed Original file line number Diff line number Diff line change @@ -44,7 +44,7 @@ See also:
44
44
45
45
_Dbg_do_info_args () {
46
46
47
- typeset -r frame_start=${1:- 0}
47
+ typeset -r frame_start=" ${1:- 0} "
48
48
49
49
eval " $_Dbg_seteglob "
50
50
if [[ $frame_start != $_Dbg_int_pat ]] ; then
@@ -53,22 +53,15 @@ _Dbg_do_info_args() {
53
53
return 1
54
54
fi
55
55
56
- # source /usr/local/share/bashdb/bashdb-trace
57
- # _Dbg_debugger
58
-
59
- typeset -i i=$frame_start
60
-
61
- (( i >= _Dbg_stack_size )) && return 1
56
+ typeset -i i=" $frame_start "
57
+ (( i >= _Dbg_stack_size - 1 )) && return 1
62
58
63
59
# Figure out which index in BASH_ARGV is position "i" (the place where
64
60
# we start our stack trace from). variable "r" will be that place.
65
61
66
62
typeset -i adjusted_pos
67
- adjusted_pos=$( _Dbg_frame_adjusted_pos $frame_start )
63
+ adjusted_pos=$( _Dbg_frame_adjusted_pos $i )
68
64
typeset -i arg_count=${BASH_ARGC[$adjusted_pos]}
69
- # echo "arg count is " $arg_count
70
- # echo "adjusted_pos is" $adjusted_pos
71
- # typeset -p BASH_ARGC
72
65
73
66
# Print out parameter list.
74
67
if (( 0 != ${# BASH_ARGC[@]} )) ; then
Original file line number Diff line number Diff line change @@ -5,4 +5,6 @@ info args
5
5
c hanoi
6
6
info args
7
7
info functions ^ ha
8
+ info args 3
9
+ info args 100
8
10
quit
Original file line number Diff line number Diff line change 19
19
$4 = c
20
20
+info functions ^ha
21
21
hanoi
22
- +quit
22
+ +info args 3
23
+ +info args 100
24
+ +quit
23
25
bashdb: That's all, folks...
You can’t perform that action at this time.
0 commit comments