File tree 1 file changed +22
-9
lines changed
1 file changed +22
-9
lines changed Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
2
set -e
3
+ set -x
3
4
4
5
params=()
5
6
pretty=()
@@ -17,8 +18,8 @@ trap 'cleanup' INT TERM EXIT
17
18
18
19
initializer=" LblinitGeneratedTopCell{}"
19
20
dir=.
20
- debug=
21
- debug_command=
21
+ debug=()
22
+ debug_command=()
22
23
depth=-1
23
24
verbose=0
24
25
binary_input=false
164
165
;;
165
166
166
167
--debug)
167
- debug=" gdb --args "
168
+ if [[ " $OSTYPE " == " darwin" * ]]; then
169
+ debug=(" lldb" " --" )
170
+ else
171
+ debug=(" gdb" " --args" )
172
+ fi
168
173
shift ;
169
174
;;
170
175
171
176
--debug-command)
172
- debug_command= " $2 "
173
- if [[ -z $debug ]]; then
174
- debug=" gdb -x ${debug_command} --args "
177
+ debug_command+=( " $2 " )
178
+ if [[ " $OSTYPE " == " darwin " * ]]; then
179
+ debug=( " lldb " " -s " )
175
180
else
176
- debug=" ${debug / --args / } -x ${debug_command} --args "
181
+ debug=( " gdb " " -x " )
177
182
fi
183
+ debug+=(" ${debug_command[@]} " )
184
+ debug+=(" --args" )
178
185
shift ;
186
+ shift
179
187
;;
180
188
181
189
--debug-batch)
182
- debug=" gdb --batch --args "
190
+ if [[ " $OSTYPE " == " darwin" * ]]; then
191
+ debug=(" lldb" " --batch" " --" )
192
+ else
193
+ debug=(" gdb" " batch" " --args" )
194
+ fi
195
+ shift
183
196
;;
184
197
185
198
--depth)
@@ -472,7 +485,7 @@ set +e
472
485
if [ " $verbose " -ge 1 ]; then
473
486
set -x
474
487
fi
475
- $ debug " $dir " /interpreter " $expanded_input_file " " $depth " " $output_file " " ${interpreter_flags[@]} "
488
+ " ${ debug[@]} " " ${ dir} /interpreter" " $expanded_input_file " " $depth " " $output_file " " ${interpreter_flags[@]} "
476
489
)
477
490
EXIT=$?
478
491
set -e
You can’t perform that action at this time.
0 commit comments