aboutsummaryrefslogtreecommitdiff
path: root/gdb/rust-lang.h
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2022-03-27 15:29:28 -0600
committerTom Tromey <tom@tromey.com>2022-04-15 10:34:03 -0600
commit1c9cc05244f67c4e5a888394b2c9a309164ca02d (patch)
tree4793ceaf045ebb1302482a69c75e0e913275bd45 /gdb/rust-lang.h
parent506ec52e8805d8edd538d6bd11750489a8c8bbee (diff)
downloadgdb-1c9cc05244f67c4e5a888394b2c9a309164ca02d.zip
gdb-1c9cc05244f67c4e5a888394b2c9a309164ca02d.tar.gz
gdb-1c9cc05244f67c4e5a888394b2c9a309164ca02d.tar.bz2
Implement value_print for Rust
This adds an implementation of the value_print method to Rust. As described in PR rust/22254, this removes a bit of weird-looking output from some "print"s -- because c_value_print is bypassed. I don't have a test for the bug that inspired this patch, because I only know how to reproduce it when using a relatively old Rust compiler. However, the new "cast-printing" code in value_print is required, because omitting this causes some existing tests to fail. Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=22254
Diffstat (limited to 'gdb/rust-lang.h')
-rw-r--r--gdb/rust-lang.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/gdb/rust-lang.h b/gdb/rust-lang.h
index 0e89b88..514494a 100644
--- a/gdb/rust-lang.h
+++ b/gdb/rust-lang.h
@@ -125,6 +125,11 @@ public:
/* See language.h. */
+ void value_print (struct value *val, struct ui_file *stream,
+ const struct value_print_options *options) const override;
+
+ /* See language.h. */
+
struct block_symbol lookup_symbol_nonlocal
(const char *name, const struct block *block,
const domain_enum domain) const override