|
@@ -945,9 +945,16 @@ sub singletest_run {
|
|
|
if($gdbthis) {
|
|
|
my $gdbinit = "$TESTDIR/gdbinit$testnum";
|
|
|
open(my $gdbcmd, ">", "$LOGDIR/gdbcmd") || die "Failure writing gdb file";
|
|
|
- print $gdbcmd "set args $cmdargs\n";
|
|
|
- print $gdbcmd "show args\n";
|
|
|
- print $gdbcmd "source $gdbinit\n" if -e $gdbinit;
|
|
|
+ if($gdbthis == 1) {
|
|
|
+ # gdb mode
|
|
|
+ print $gdbcmd "set args $cmdargs\n";
|
|
|
+ print $gdbcmd "show args\n";
|
|
|
+ print $gdbcmd "source $gdbinit\n" if -e $gdbinit;
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ # lldb mode
|
|
|
+ print $gdbcmd "set args $cmdargs\n";
|
|
|
+ }
|
|
|
close($gdbcmd) || die "Failure writing gdb file";
|
|
|
}
|
|
|
|
|
@@ -963,11 +970,18 @@ sub singletest_run {
|
|
|
$testnum,
|
|
|
"$gdb --directory $LIBDIR " . shell_quote($DBGCURL) . " -x $LOGDIR/gdbcmd");
|
|
|
}
|
|
|
- elsif($gdbthis) {
|
|
|
+ elsif($gdbthis == 1) {
|
|
|
+ # gdb
|
|
|
my $GDBW = ($gdbxwin) ? "-w" : "";
|
|
|
runclient("$gdb --directory $LIBDIR " . shell_quote($DBGCURL) . " $GDBW -x $LOGDIR/gdbcmd");
|
|
|
$cmdres=0; # makes it always continue after a debugged run
|
|
|
}
|
|
|
+ elsif($gdbthis == 2) {
|
|
|
+ # $gdb is "lldb"
|
|
|
+ print "runs lldb -- $CURL $cmdargs\n";
|
|
|
+ runclient("lldb -- $CURL $cmdargs");
|
|
|
+ $cmdres=0; # makes it always continue after a debugged run
|
|
|
+ }
|
|
|
else {
|
|
|
# Convert the raw result code into a more useful one
|
|
|
($cmdres, $dumped_core) = normalize_cmdres(runclient("$CMDLINE"));
|