Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Add -gdb and -lldb shortcuts to smpirun
authordegomme <adegomme@users.noreply.github.com>
Thu, 28 Mar 2019 13:11:30 +0000 (14:11 +0100)
committerdegomme <adegomme@users.noreply.github.com>
Thu, 28 Mar 2019 17:35:56 +0000 (18:35 +0100)
src/smpi/smpirun.in

index 8d28059..3536dd1 100755 (executable)
@@ -35,6 +35,8 @@ Usage: $0 [OPTIONS] -platform <xmldesc> -hostfile <hostfile> program [program-op
 Options:
   -keep-temps                # don't remove the generated files after execution
   -wrapper <command>         # use command to run the program (e.g. "valgrind" or "gdb --args")
+  -gdb                       # run within GDB (-wrapper "gdb --args" -keep-temps)
+  -lldb                      # run within LLDB (-wrapper "lldb --" -keep-temps)
   -map                       # display the machine on which each process rank is mapped
   -np <numprocs>             # use that amount of processes from the hostfile.
                              # By default, all processes of the hostfile are used.
@@ -195,14 +197,26 @@ while true; do
             shift 1
             ;;
         "-keep-temps")
-           KEEP="true"
-           SIMOPTS="$SIMOPTS --cfg=smpi/keep-temps:yes"
+            KEEP="true"
+            SIMOPTS="$SIMOPTS --cfg=smpi/keep-temps:yes"
             shift 1
             ;;
         "-wrapper")
             WRAPPER="$2"
             shift 2
             ;;
+        "-gdb")
+            WRAPPER="gdb --args"
+            KEEP="true"
+            SIMOPTS="$SIMOPTS --cfg=smpi/keep-temps:yes"
+            shift 1
+            ;;
+        "-lldb")
+            WRAPPER="lldb --"
+            KEEP="true"
+            SIMOPTS="$SIMOPTS --cfg=smpi/keep-temps:yes"
+            shift 1
+            ;;
         "-help" | "--help" | "-h")
             usage
             exit 0