Skip to content

Commit d6426e8

Browse files
committed
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.
1 parent 73b5c7e commit d6426e8

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/etc/rust-gdb

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ GDB_PYTHON_MODULE_DIRECTORY="$RUSTC_SYSROOT/lib/rustlib/etc"
2020
# Set the environment variable `RUST_GDB` to overwrite the call to a
2121
# different/specific command (defaults to `gdb`).
2222
RUST_GDB="${RUST_GDB:-gdb}"
23-
PYTHONPATH="$PYTHONPATH:$GDB_PYTHON_MODULE_DIRECTORY" ${RUST_GDB} \
23+
PYTHONPATH="$PYTHONPATH:$GDB_PYTHON_MODULE_DIRECTORY" exec ${RUST_GDB} \
2424
--directory="$GDB_PYTHON_MODULE_DIRECTORY" \
2525
-iex "add-auto-load-safe-path $GDB_PYTHON_MODULE_DIRECTORY" \
2626
"$@"

src/etc/rust-lldb

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ category_definition="type summary add --no-value --python-function lldb_rust_for
3232
category_enable="type category enable Rust"
3333

3434
# Call LLDB with the commands added to the argument list
35-
lldb --one-line-before-file="$script_import" \
35+
exec lldb --one-line-before-file="$script_import" \
3636
--one-line-before-file="$category_definition" \
3737
--one-line-before-file="$category_enable" \
3838
"$@"

0 commit comments

Comments
 (0)