X-Git-Url: https://repo.jachan.dev/binutils.git/blobdiff_plain/21a527dfc85d62c9e90c65ac4076f517a6b76a48..HEAD:/gdb/rust-lang.h diff --git a/gdb/rust-lang.h b/gdb/rust-lang.h index 6da57f8633..a1d10263fe 100644 --- a/gdb/rust-lang.h +++ b/gdb/rust-lang.h @@ -107,6 +107,13 @@ public: /* See language.h. */ + bool can_print_type_offsets () const override + { + return true; + } + + /* See language.h. */ + void print_type (struct type *type, const char *varstring, struct ui_file *stream, int show, int level, const struct type_print_options *flags) const override; @@ -116,7 +123,7 @@ public: gdb::unique_xmalloc_ptr watch_location_expression (struct type *type, CORE_ADDR addr) const override { - type = check_typedef (TYPE_TARGET_TYPE (check_typedef (type))); + type = check_typedef (check_typedef (type)->target_type ()); std::string name = type_to_string (type); return xstrprintf ("*(%s as *mut %s)", core_addr_to_string (addr), name.c_str ());