Commit 3dcf301 1 parent f58e493 commit 3dcf301 Copy full SHA for 3dcf301
File tree 3 files changed +27
-4
lines changed
3 files changed +27
-4
lines changed Original file line number Diff line number Diff line change @@ -945,9 +945,16 @@ sub singletest_run {
945
945
if ($gdbthis ) {
946
946
my $gdbinit = " $TESTDIR /gdbinit$testnum " ;
947
947
open (my $gdbcmd , " >" , " $LOGDIR /gdbcmd" ) || die " Failure writing gdb file" ;
948
- print $gdbcmd " set args $cmdargs \n " ;
949
- print $gdbcmd " show args\n " ;
950
- print $gdbcmd " source $gdbinit \n " if -e $gdbinit ;
948
+ if ($gdbthis == 1) {
949
+ # gdb mode
950
+ print $gdbcmd " set args $cmdargs \n " ;
951
+ print $gdbcmd " show args\n " ;
952
+ print $gdbcmd " source $gdbinit \n " if -e $gdbinit ;
953
+ }
954
+ else {
955
+ # lldb mode
956
+ print $gdbcmd " set args $cmdargs \n " ;
957
+ }
951
958
close ($gdbcmd ) || die " Failure writing gdb file" ;
952
959
}
953
960
@@ -963,11 +970,18 @@ sub singletest_run {
963
970
$testnum ,
964
971
" $gdb --directory $LIBDIR " . shell_quote($DBGCURL ) . " -x $LOGDIR /gdbcmd" );
965
972
}
966
- elsif ($gdbthis ) {
973
+ elsif ($gdbthis == 1) {
974
+ # gdb
967
975
my $GDBW = ($gdbxwin ) ? " -w" : " " ;
968
976
runclient(" $gdb --directory $LIBDIR " . shell_quote($DBGCURL ) . " $GDBW -x $LOGDIR /gdbcmd" );
969
977
$cmdres =0; # makes it always continue after a debugged run
970
978
}
979
+ elsif ($gdbthis == 2) {
980
+ # $gdb is "lldb"
981
+ print " runs lldb -- $CURL $cmdargs \n " ;
982
+ runclient(" lldb -- $CURL $cmdargs " );
983
+ $cmdres =0; # makes it always continue after a debugged run
984
+ }
971
985
else {
972
986
# Convert the raw result code into a more useful one
973
987
($cmdres , $dumped_core ) = normalize_cmdres(runclient(" $CMDLINE " ));
Original file line number Diff line number Diff line change @@ -116,6 +116,11 @@ Run the given test(s) with gdb. This is best used on a single test case and
116
116
curl built --disable-shared. This then fires up gdb with command line set to
117
117
run the specified test case. Simply (set a break-point and) type 'run' to
118
118
start.
119
+ .IP " -gl"
120
+ Run the given test(s) with lldb. This is best used on a single test case and
121
+ curl built --disable-shared. This then fires up lldb with command line set to
122
+ run the specified test case. Simply (set a break-point and) type 'run' to
123
+ start.
119
124
.IP " -gw"
120
125
Run the given test(s) with gdb as a windowed application.
121
126
.IP " -h, --help"
Original file line number Diff line number Diff line change @@ -2215,6 +2215,10 @@ sub pickrunner {
2215
2215
# run this test with gdb
2216
2216
$gdbthis =1;
2217
2217
}
2218
+ elsif ($ARGV [0] eq " -gl" ) {
2219
+ # run this test with lldb
2220
+ $gdbthis =2;
2221
+ }
2218
2222
elsif ($ARGV [0] eq " -gw" ) {
2219
2223
# run this test with windowed gdb
2220
2224
$gdbthis =1;
You can’t perform that action at this time.
0 commit comments