From: degomme Date: Thu, 28 Mar 2019 13:11:30 +0000 (+0100) Subject: Add -gdb and -lldb shortcuts to smpirun X-Git-Tag: v3_22~25^2~2 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/7aae0300f97d9f6269e1b11b2ddb92db7679d3f4?hp=18449bfffced07ec0a49297f1eb76c4fe6792895 Add -gdb and -lldb shortcuts to smpirun --- diff --git a/src/smpi/smpirun.in b/src/smpi/smpirun.in index 8d280593c0..3536dd145c 100755 --- a/src/smpi/smpirun.in +++ b/src/smpi/smpirun.in @@ -35,6 +35,8 @@ Usage: $0 [OPTIONS] -platform -hostfile program [program-op Options: -keep-temps # don't remove the generated files after execution -wrapper # 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 # 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