Skip to content

Commit 5260d98

Browse files
committed
Add rust-gdbgui to the list of proxied tools
Attempts to complete #1950 which was closed due to inactivity. It appears that everywhere the rust-gdb wrapper script is available so is the rust-gdbgui. https://github.com/rust-lang/rust/blob/a435b49e86d16e98dcc6595dd471f95e823f41aa/src/bootstrap/dist.rs#L513
1 parent 08972a6 commit 5260d98

File tree

4 files changed

+18
-3
lines changed

4 files changed

+18
-3
lines changed

doc/src/concepts/proxies.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ The list of proxies is currently static in `rustup` and is as follows:
1414

1515
- `cargo` is the Rust package manager which downloads your Rust package’s dependencies, compiles your packages, makes distributable packages, and uploads them to crates.io (the Rust community’s package registry). It comes from the `cargo` component.
1616

17-
- `rust-lldb` and `rust-gdb` are simple wrappers around the `lldb` and `gdb` debuggers respectively. The wrappers enable some pretty-printing of Rust values and add some convenience features to the debuggers by means of their scripting interfaces.
17+
- `rust-lldb`, `rust-gdb`, and `rust-gdbgui` are simple wrappers around the `lldb`, `gdb`, and `gdbgui` debuggers respectively. The wrappers enable some pretty-printing of Rust values and add some convenience features to the debuggers by means of their scripting interfaces.
1818

1919
- `rls` is part of the Rust IDE integration tooling. It implements the language-server protocol to permit IDEs and editors such as Visual Studio Code, ViM, or Emacs, access to the semantics of the Rust code you are editing. It comes from the `rls` component.
2020

src/lib.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ pub static TOOLS: &[&str] = &[
2525
"cargo",
2626
"rust-lldb",
2727
"rust-gdb",
28+
"rust-gdbgui",
2829
"rls",
2930
"cargo-clippy",
3031
"clippy-driver",
@@ -48,7 +49,7 @@ fn component_for_bin(binary: &str) -> Option<&'static str> {
4849
match binary_prefix {
4950
"rustc" | "rustdoc" => Some("rustc"),
5051
"cargo" => Some("cargo"),
51-
"rust-lldb" | "rust-gdb" => Some("rustc"), // These are not always available
52+
"rust-lldb" | "rust-gdb" | "rust-gdbgui" => Some("rustc"), // These are not always available
5253
"rls" => Some("rls"),
5354
"cargo-clippy" => Some("clippy"),
5455
"clippy-driver" => Some("clippy"),

tests/cli-misc.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,7 @@ fn rustup_failed_path_search() {
325325
expect_err(
326326
config,
327327
broken,
328-
&"unknown proxy name: 'fake_proxy'; valid proxy names are 'rustc', 'rustdoc', 'cargo', 'rust-lldb', 'rust-gdb', 'rls', 'cargo-clippy', 'clippy-driver', 'cargo-miri', 'rustfmt', 'cargo-fmt'".to_string(),
328+
&"unknown proxy name: 'fake_proxy'; valid proxy names are 'rustc', 'rustdoc', 'cargo', 'rust-lldb', 'rust-gdb', 'rust-gdbgui', 'rls', 'cargo-clippy', 'clippy-driver', 'cargo-miri', 'rustfmt', 'cargo-fmt'".to_string(),
329329
);
330330

331331
// Hardlink will be automatically cleaned up by test setup code

tests/cli-self-upd.rs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,9 @@ info: default toolchain set to 'stable-{0}'
9292
.cargodir
9393
.join(&format!("bin/rust-lldb{}", EXE_SUFFIX));
9494
let rust_gdb = config.cargodir.join(&format!("bin/rust-gdb{}", EXE_SUFFIX));
95+
let rust_gdbgui = config
96+
.cargodir
97+
.join(&format!("bin/rust-gdbgui{}", EXE_SUFFIX));
9598
#[cfg(windows)]
9699
fn check(path: &Path) {
97100
assert!(path.exists());
@@ -111,6 +114,7 @@ info: default toolchain set to 'stable-{0}'
111114
check(&cargo);
112115
check(&rust_lldb);
113116
check(&rust_gdb);
117+
check(&rust_gdbgui);
114118
})
115119
});
116120
}
@@ -165,12 +169,16 @@ fn uninstall_deletes_bins() {
165169
.cargodir
166170
.join(&format!("bin/rust-lldb{}", EXE_SUFFIX));
167171
let rust_gdb = config.cargodir.join(&format!("bin/rust-gdb{}", EXE_SUFFIX));
172+
let rust_gdbgui = config
173+
.cargodir
174+
.join(&format!("bin/rust-gdbgui{}", EXE_SUFFIX));
168175
assert!(!rustup.exists());
169176
assert!(!rustc.exists());
170177
assert!(!rustdoc.exists());
171178
assert!(!cargo.exists());
172179
assert!(!rust_lldb.exists());
173180
assert!(!rust_gdb.exists());
181+
assert!(!rust_gdbgui.exists());
174182
});
175183
}
176184

@@ -185,6 +193,7 @@ fn uninstall_works_if_some_bins_dont_exist() {
185193
.cargodir
186194
.join(&format!("bin/rust-lldb{}", EXE_SUFFIX));
187195
let rust_gdb = config.cargodir.join(&format!("bin/rust-gdb{}", EXE_SUFFIX));
196+
let rust_gdbgui = config.cargodir.join(&format!("bin/rust-gdbgui{}", EXE_SUFFIX));
188197

189198
fs::remove_file(&rustc).unwrap();
190199
fs::remove_file(&cargo).unwrap();
@@ -197,6 +206,7 @@ fn uninstall_works_if_some_bins_dont_exist() {
197206
assert!(!cargo.exists());
198207
assert!(!rust_lldb.exists());
199208
assert!(!rust_gdb.exists());
209+
assert!(!rust_gdbgui.exists());
200210
});
201211
}
202212

@@ -263,11 +273,15 @@ fn uninstall_self_delete_works() {
263273
.cargodir
264274
.join(&format!("bin/rust-lldb{}", EXE_SUFFIX));
265275
let rust_gdb = config.cargodir.join(&format!("bin/rust-gdb{}", EXE_SUFFIX));
276+
let rust_gdbgui = config
277+
.cargodir
278+
.join(&format!("bin/rust-gdbgui{}", EXE_SUFFIX));
266279
assert!(!rustc.exists());
267280
assert!(!rustdoc.exists());
268281
assert!(!cargo.exists());
269282
assert!(!rust_lldb.exists());
270283
assert!(!rust_gdb.exists());
284+
assert!(!rust_gdbgui.exists());
271285
});
272286
}
273287

0 commit comments

Comments
 (0)