From 7aae0300f97d9f6269e1b11b2ddb92db7679d3f4 Mon Sep 17 00:00:00 2001 From: degomme Date: Thu, 28 Mar 2019 14:11:30 +0100 Subject: [PATCH] Add -gdb and -lldb shortcuts to smpirun --- src/smpi/smpirun.in | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) 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 -- 2.20.1