summaryrefslogtreecommitdiff
path: root/template
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2020-06-13 08:09:00 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2020-06-13 08:22:06 +0900
commit1f1b62fb7bb0855788f3da7fdcf9e440ff617fb3 (patch)
treeabb209233300ed7e4994c7ae7e93ae08b3ad5805 /template
parenteabdad5e2f66355558286f38ba60703b1bfc8e89 (diff)
downloadruby-1f1b62fb7bb0855788f3da7fdcf9e440ff617fb3.tar.gz
Added install-dbg
Scripts to run the interpreter via debugger.
Diffstat (limited to 'template')
-rwxr-xr-xtemplate/ruby-gdb.in6
-rwxr-xr-xtemplate/ruby-lldb.in6
2 files changed, 12 insertions, 0 deletions
diff --git a/template/ruby-gdb.in b/template/ruby-gdb.in
new file mode 100755
index 0000000000..7ab4e976c6
--- /dev/null
+++ b/template/ruby-gdb.in
@@ -0,0 +1,6 @@
+#!/bin/sh
+prefix="/${0%/*}"
+prefix="${prefix%/*}"
+ruby="${bindir}/${RUBY_INSTALL_NAME}"
+gdbinit="${rubylibdir}/gdbinit"
+exec gdb --command="$gdbinit" --args "$ruby" "$@"
diff --git a/template/ruby-lldb.in b/template/ruby-lldb.in
new file mode 100755
index 0000000000..c33603b94d
--- /dev/null
+++ b/template/ruby-lldb.in
@@ -0,0 +1,6 @@
+#!/bin/sh
+prefix="/${0%/*}"
+prefix="${prefix%/*}"
+ruby="${bindir}/${RUBY_INSTALL_NAME}"
+lldbinit="${rubylibdir}/lldb_cruby.py"
+exec lldb -O "command script import $lldbinit" "$ruby" -- "$@"