brson/multirust

rust-gdb on OS X

Opened this issue · 4 comments

On OS X, I noticed that the current implementation of multirust does not seem to copy the rust-gdb script (https://github.com/rust-lang/rust/blob/master/src/etc/rust-gdb) into the ~/.multirust/toolchains/stable/bin/ directory. For other toolchains, like nightly, etc. I have not tested, but I assume the same behavior. Only the rust-lldb pretty-printer script seems to be copied.

I personally installed gdb on my MacBook because I like it more than rust-lldb, so I would appreciate it if the rust-gdb script could be copied into ~/.multirust/toolchains/stable/bin/ as well.

After all, the helper script rust-gdb which is in my PATH (i.e., /usr/local/bin/rust-gdb) actually gets installed, but fails on the last line

exec "$sysroot/bin/$rust_cmd" $extra_flags "$@"

because - as stated above - cannot find ~/.multirust/toolchains/stable/bin/rust-gdb.

Edit: Maybe that is actually a flaw of the actual rust installation process, but so far I haven't used rust, only multirust.

brson commented

Hey @davidbecher. Thanks for your report. As I think you've guessed, installing rust-gdb is a function of the Rust project itself.

cc rust-lang/rust#30706

brson commented

Oh, actually, multirust does care about this. It creates the proxy bin here, and seemingly only for rust-llvm on darwin.

brson commented

Hm, according to this line, rust-gdb should be installed unconditionally.

brson commented

Oh, but you are not seeing the actual rust-gdb script in the toolchain directory where it should be installed. Yeah, that should be handled by Rust itself.

So I think for multirust, the thing to do is probably to create the rust-lldb proxy unconditionally, though that has no impact on your case.