public inbox for gdb-cvs@sourceware.org
help / color / mirror / Atom feed
* [binutils-gdb] Remove some dead code from the Rust value printer
@ 2022-04-15 17:35 Tom Tromey
0 siblings, 0 replies; only message in thread
From: Tom Tromey @ 2022-04-15 17:35 UTC (permalink / raw)
To: gdb-cvs
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=925ea601f1892c6eb344e2c916f0ef448b42b606
commit 925ea601f1892c6eb344e2c916f0ef448b42b606
Author: Tom Tromey <tom@tromey.com>
Date: Fri Mar 25 13:43:27 2022 -0600
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.
Diff:
---
gdb/rust-lang.c | 8 --------
1 file changed, 8 deletions(-)
diff --git a/gdb/rust-lang.c b/gdb/rust-lang.c
index 836ea37f153..fdd6e3fbdbb 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;
}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-04-15 17:35 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-15 17:35 [binutils-gdb] Remove some dead code from the Rust value printer Tom Tromey
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).