@@ -132,36 +132,36 @@ _Dbg_debug_trap_handler() {
132
132
for (( _Dbg_i= 0 ; _Dbg_i < _Dbg_watch_max ; _Dbg_i++ )) ; do
133
133
if [ -n " ${_Dbg_watch_exp[$_Dbg_i]} " ] \
134
134
&& [[ ${_Dbg_watch_enable[_Dbg_i]} != 0 ]] ; then
135
- typeset new_val =$( _Dbg_get_watch_exp_eval $_Dbg_i )
136
- typeset old_val =${_Dbg_watch_val[$_Dbg_i]}
137
- if [[ $old_val != $new_val ]] ; then
135
+ typeset _Dbg_new_val =$( _Dbg_get_watch_exp_eval $_Dbg_i )
136
+ typeset _Dbg_old_val =${_Dbg_watch_val[$_Dbg_i]}
137
+ if [[ $_Dbg_old_val != $_Dbg_new_val ]] ; then
138
138
(( _Dbg_watch_count[_Dbg_i]++ ))
139
139
_Dbg_msg " Watchpoint $_Dbg_i : ${_Dbg_watch_exp[$_Dbg_i]} changed:"
140
- _Dbg_msg " old value: '$old_val '"
141
- _Dbg_msg " new value: '$new_val '"
142
- _Dbg_watch_val[$_Dbg_i ]=$new_val
140
+ _Dbg_msg " old value: '$_Dbg_old_val '"
141
+ _Dbg_msg " new value: '$_Dbg_new_val '"
142
+ _Dbg_watch_val[$_Dbg_i ]=$_Dbg_new_val
143
143
_Dbg_hook_enter_debugger ' on a watch trigger'
144
144
return $_Dbg_continue_rc
145
145
fi
146
146
fi
147
147
done
148
148
149
- typeset full_filename
150
- full_filename =$( _Dbg_is_file " $_Dbg_frame_last_filename " )
151
- if [[ -r $full_filename ]] ; then
152
- _Dbg_file2canonic[$_Dbg_frame_last_filename ]=" $full_filename "
149
+ typeset _Dbg_full_filename
150
+ _Dbg_full_filename =$( _Dbg_is_file " $_Dbg_frame_last_filename " )
151
+ if [[ -r " $_Dbg_full_filename " ]] ; then
152
+ _Dbg_file2canonic[" $_Dbg_frame_last_filename " ]=" $_Dbg_full_filename "
153
153
fi
154
154
155
155
# Run applicable action statement
156
156
if (( _Dbg_action_count > 0 )) ; then
157
- _Dbg_hook_action_hit " $full_filename "
157
+ _Dbg_hook_action_hit " $_Dbg_full_filename "
158
158
fi
159
159
160
160
# Determine if we stop or not.
161
161
162
162
# Check breakpoints.
163
163
if (( _Dbg_brkpt_count > 0 )) ; then
164
- if _Dbg_hook_breakpoint_hit " $full_filename " ; then
164
+ if _Dbg_hook_breakpoint_hit " $_Dbg_full_filename " ; then
165
165
if (( _Dbg_step_force)) ; then
166
166
typeset _Dbg_frame_previous_file=" $_Dbg_frame_last_filename "
167
167
typeset -i _Dbg_frame_previous_lineno=" $_Dbg_frame_last_lineno "
@@ -228,21 +228,21 @@ _Dbg_debug_trap_handler() {
228
228
}
229
229
230
230
_Dbg_hook_action_hit () {
231
- typeset full_filename =" $1 "
232
- typeset lineno =$_Dbg_frame_last_lineno
231
+ typeset _Dbg_full_filename =" $1 "
232
+ typeset _Dbg_lineno =$_Dbg_frame_last_lineno
233
233
234
234
# FIXME: combine with _Dbg_unset_action
235
- typeset -a linenos
236
- [[ -z " $full_filename " ]] && return 1
237
- eval " linenos =(${_Dbg_action_file2linenos["$full_filename "]} )"
238
- typeset -a action_nos
239
- eval " action_nos =(${_Dbg_action_file2action["$full_filename "]} )"
235
+ typeset -a _Dbg_linenos
236
+ [[ -z " $_Dbg_full_filename " ]] && return 1
237
+ eval " _Dbg_linenos =(${_Dbg_action_file2linenos["$_Dbg_full_filename "]} )"
238
+ typeset -a _Dbg_action_nos
239
+ eval " _Dbg_action_nos =(${_Dbg_action_file2action["$_Dbg_full_filename "]} )"
240
240
241
241
typeset -i _Dbg_i
242
242
# Check action within full_filename
243
- for (( _Dbg_i= 0 ; _Dbg_i < ${# linenos [@]} ; _Dbg_i++ )) ; do
244
- if (( linenos [_Dbg_i] == lineno )) ; then
245
- (( _Dbg_action_num = action_nos [_Dbg_i] ))
243
+ for (( _Dbg_i= 0 ; _Dbg_i < ${# _Dbg_linenos [@]} ; _Dbg_i++ )) ; do
244
+ if (( _Dbg_linenos [_Dbg_i] == _Dbg_lineno )) ; then
245
+ (( _Dbg_action_num = _Dbg_action_nos [_Dbg_i] ))
246
246
stmt=" ${_Dbg_action_stmt[$_Dbg_action_num]} "
247
247
. " ${_Dbg_libdir} /set-d-vars.sh"
248
248
eval " $stmt "
@@ -258,22 +258,22 @@ _Dbg_hook_action_hit() {
258
258
# Return 0 if we are at a breakpoint position or 1 if not.
259
259
# Sets _Dbg_brkpt_num to the breakpoint number found.
260
260
_Dbg_hook_breakpoint_hit () {
261
- typeset full_filename =" $1 "
262
- typeset lineno =$_Dbg_frame_last_lineno
261
+ typeset _Dbg_full_filename =" $1 "
262
+ typeset _Dbg_lineno =$_Dbg_frame_last_lineno
263
263
264
264
# FIXME: combine with _Dbg_unset_brkpt
265
- typeset -a linenos
266
- [[ -z " $full_filename " ]] && return 1
267
- [[ -z " ${_Dbg_brkpt_file2linenos["$full_filename "]} " ]] && return 1
268
- eval " linenos =(${_Dbg_brkpt_file2linenos["$full_filename "]} )"
269
- typeset -a brkpt_nos
270
- eval " brkpt_nos =(${_Dbg_brkpt_file2brkpt["$full_filename "]} )"
271
- typeset -i i
265
+ typeset -a _Dbg_linenos
266
+ [[ -z " $_Dbg_full_filename " ]] && return 1
267
+ [[ -z " ${_Dbg_brkpt_file2linenos["$_Dbg_full_filename "]} " ]] && return 1
268
+ eval " _Dbg_linenos =(${_Dbg_brkpt_file2linenos["$_Dbg_full_filename "]} )"
269
+ typeset -a _Dbg_brkpt_nos
270
+ eval " _Dbg_brkpt_nos =(${_Dbg_brkpt_file2brkpt["$_Dbg_full_filename "]} )"
271
+ typeset -i _Dbg_i
272
272
# Check breakpoints within full_filename
273
- for (( i = 0 ; i < ${# linenos [@]} ; i ++ )) ; do
274
- if (( linenos[i ] == lineno )) ; then
273
+ for (( _Dbg_i = 0 ; _Dbg_i < ${# _Dbg_linenos [@]} ; _Dbg_i ++ )) ; do
274
+ if (( _Dbg_linenos[_Dbg_i ] == _Dbg_lineno )) ; then
275
275
# Got a match, but is the breakpoint enabled and condition met?
276
- (( _Dbg_brkpt_num = brkpt_nos[i ] ))
276
+ (( _Dbg_brkpt_num = _Dbg_brkpt_nos[_Dbg_i ] ))
277
277
if (( _Dbg_brkpt_enable[_Dbg_brkpt_num] )) ; then
278
278
279
279
if ( eval " ((${_Dbg_brkpt_cond[_Dbg_brkpt_num]} ))" || eval " ${_Dbg_brkpt_cond[_Dbg_brkpt_num]} " ) 2> /dev/null; then
0 commit comments