aboutsummaryrefslogtreecommitdiff
path: root/gdb/rust-lang.c
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2022-03-25 13:43:27 -0600
committerTom Tromey <tom@tromey.com>2022-04-15 10:34:03 -0600
commit925ea601f1892c6eb344e2c916f0ef448b42b606 (patch)
treeed8fc7e2ab6aa94674211d11d207ae29c248547b /gdb/rust-lang.c
parent7410508723bf20c29ea8d5888eee9c45e5fae0a2 (diff)
downloadgdb-925ea601f1892c6eb344e2c916f0ef448b42b606.zip
gdb-925ea601f1892c6eb344e2c916f0ef448b42b606.tar.gz
gdb-925ea601f1892c6eb344e2c916f0ef448b42b606.tar.bz2
Remove some dead code from the Rust value printer
This removes a bit of dead code from the Rust value printer. This code wasn't always dead -- it fixed a real bug, and a test case was added for it. However, once val_print was removed, it became unnecessary.
Diffstat (limited to 'gdb/rust-lang.c')
-rw-r--r--gdb/rust-lang.c8
1 files changed, 0 insertions, 8 deletions
diff --git a/gdb/rust-lang.c b/gdb/rust-lang.c
index 836ea37..fdd6e3f 100644
--- a/gdb/rust-lang.c
+++ b/gdb/rust-lang.c
@@ -324,14 +324,6 @@ rust_language::val_print_struct
if (rust_slice_type_p (type) && strcmp (type->name (), "&str") == 0)
{
- /* If what we are printing here is actually a string within a
- structure then VAL will be the original parent value, while TYPE
- will be the type of the structure representing the string we want
- to print.
- However, RUST_VAL_PRINT_STR looks up the fields of the string
- inside VAL, assuming that VAL is the string.
- So, recreate VAL as a value representing just the string. */
- val = value_at_lazy (type, value_address (val));
rust_val_print_str (stream, val, options);
return;
}