public inbox for gdb-cvs@sourceware.org help / color / mirror / Atom feed
From: Tom Tromey <tromey@sourceware.org> To: gdb-cvs@sourceware.org Subject: [binutils-gdb] Remove some dead code from the Rust value printer Date: Fri, 15 Apr 2022 17:35:52 +0000 (GMT) [thread overview] Message-ID: <20220415173552.0E4ED3858C2C@sourceware.org> (raw) 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; }
reply other threads:[~2022-04-15 17:35 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20220415173552.0E4ED3858C2C@sourceware.org \ --to=tromey@sourceware.org \ --cc=gdb-cvs@sourceware.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).