about summary refs log tree commit diff
diff options
context:
space:
mode:
authorftilde <ftilde@protonmail.com>2018-08-18 23:48:26 +0200
committerftilde <ftilde@protonmail.com>2018-08-19 00:00:00 +0200
commitd6426e8a25baa3011b9db14aca660b39b9867578 (patch)
tree630eaae13aba4333d71c523e1659b37b7db1666d
parent73b5c7eda2a44aea26b5e62f8caaddc6902a45bb (diff)
downloadrust-d6426e8a25baa3011b9db14aca660b39b9867578.tar.gz
rust-d6426e8a25baa3011b9db14aca660b39b9867578.zip
Exec gdb and lldb in rust-* wrappers
This way the process we get by calling rust-{gdb,lldb} is an actual
{gdb,lldb} instance and not (perhaps surprisingly) a script waiting for
the debugger process to finish. Thus, sending a SIGINT to the spawned
process stops execution of the child, for example.
-rwxr-xr-xsrc/etc/rust-gdb2
-rwxr-xr-xsrc/etc/rust-lldb2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/etc/rust-gdb b/src/etc/rust-gdb
index 6835d6aa908..743952a5bef 100755
--- a/src/etc/rust-gdb
+++ b/src/etc/rust-gdb
@@ -20,7 +20,7 @@ GDB_PYTHON_MODULE_DIRECTORY="$RUSTC_SYSROOT/lib/rustlib/etc"
 # Set the environment variable `RUST_GDB` to overwrite the call to a
 # different/specific command (defaults to `gdb`).
 RUST_GDB="${RUST_GDB:-gdb}"
-PYTHONPATH="$PYTHONPATH:$GDB_PYTHON_MODULE_DIRECTORY" ${RUST_GDB} \
+PYTHONPATH="$PYTHONPATH:$GDB_PYTHON_MODULE_DIRECTORY" exec ${RUST_GDB} \
   --directory="$GDB_PYTHON_MODULE_DIRECTORY" \
   -iex "add-auto-load-safe-path $GDB_PYTHON_MODULE_DIRECTORY" \
   "$@"
diff --git a/src/etc/rust-lldb b/src/etc/rust-lldb
index 56851595dd5..6a2849b5548 100755
--- a/src/etc/rust-lldb
+++ b/src/etc/rust-lldb
@@ -32,7 +32,7 @@ category_definition="type summary add --no-value --python-function lldb_rust_for
 category_enable="type category enable Rust"
 
 # Call LLDB with the commands added to the argument list
-lldb --one-line-before-file="$script_import" \
+exec lldb --one-line-before-file="$script_import" \
     --one-line-before-file="$category_definition" \
     --one-line-before-file="$category_enable" \
     "$@"