Skip to content

Commit

Permalink
Merge pull request #3489 from Kaiepi/debugger-overrides
Browse files Browse the repository at this point in the history
Allow debuggers to be specified by environment variables
  • Loading branch information
vrurg committed May 5, 2020
2 parents c3bdb61 + b01b012 commit 6a79e18
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 3 deletions.
14 changes: 13 additions & 1 deletion tools/templates/moar/rakudo-gdb-m.in
Expand Up @@ -2,4 +2,16 @@

@insert(rakudo-debug-notice)@

gdb --quiet --ex=run --args "@expand(@MOAR@)@" @expand(@runner_opts@)@ "$@"
GDB="gdb"
if [ -n "$RAKUDO_GDB" ]; then
GDB="$RAKUDO_GDB"
else
case "$(uname)" in
OpenBSD)
if which egdb >/dev/null; then
GDB="egdb"
fi
esac
fi

"$GDB" --quiet --ex=run --args "@expand(@MOAR@)@" @expand(@runner_opts@)@ "$@"
6 changes: 5 additions & 1 deletion tools/templates/moar/rakudo-lldb-m.in
Expand Up @@ -2,4 +2,8 @@

@insert(rakudo-debug-notice)@

lldb -o run "@expand(@MOAR@)@" -- @expand(@runner_opts@)@ "$@"
LLDB="lldb"
if [ -n "$RAKUDO_LLDB" ]; then
LLDB="$RAKUDO_LLDB"
fi
"$LLDB" -o run "@expand(@MOAR@)@" -- @expand(@runner_opts@)@ "$@"
6 changes: 5 additions & 1 deletion tools/templates/moar/rakudo-valgrind-m.in
Expand Up @@ -15,4 +15,8 @@ say "running on $*DISTRO.gist() / $*KERNEL.gist()";
say "-" x 96;
)@

valgrind ${MVM_VALGRIND_OPTS} "@expand(@MOAR@)@" @expand(@runner_opts@)@ "$@"
VALGRIND="valgrind"
if [ -n "$RAKUDO_VALGRIND" ]; then
VALGRIND="$RAKUDO_VALGRIND"
fi
"$VALGRIND" ${MVM_VALGRIND_OPTS} "@expand(@MOAR@)@" @expand(@runner_opts@)@ "$@"

0 comments on commit 6a79e18

Please sign in to comment.