]> Git Repo - binutils.git/blobdiff - gdb/rust-lang.h
Automatic date update in version.in
[binutils.git] / gdb / rust-lang.h
index 60a1967ff451c7af2c1e37d70347c25425b0a4f7..a1d10263feb3ffc355ad983de1600d7399d0c2c5 100644 (file)
@@ -71,6 +71,11 @@ public:
 
   /* See language.h.  */
 
+  const char *get_digit_separator () const override
+  { return "_"; }
+
+  /* See language.h.  */
+
   const std::vector<const char *> &filename_extensions () const override
   {
     static const std::vector<const char *> extensions = { ".rs" };
@@ -102,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;
@@ -111,7 +123,7 @@ public:
   gdb::unique_xmalloc_ptr<char> 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 ());
@@ -125,6 +137,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
@@ -133,11 +150,11 @@ public:
 
     if (symbol_lookup_debug)
       {
-       fprintf_unfiltered (gdb_stdlog,
-                           "rust_lookup_symbol_non_local"
-                           " (%s, %s (scope %s), %s)\n",
-                           name, host_address_to_string (block),
-                           block_scope (block), domain_name (domain));
+       gdb_printf (gdb_stdlog,
+                   "rust_lookup_symbol_non_local"
+                   " (%s, %s (scope %s), %s)\n",
+                   name, host_address_to_string (block),
+                   block_scope (block), domain_name (domain));
       }
 
     /* Look up bare names in the block's scope.  */
@@ -178,9 +195,9 @@ public:
   void printchar (int ch, struct type *chtype,
                  struct ui_file *stream) const override
   {
-    fputs_filtered ("'", stream);
+    gdb_puts ("'", stream);
     emitchar (ch, chtype, stream, '\'');
-    fputs_filtered ("'", stream);
+    gdb_puts ("'", stream);
   }
 
   /* See language.h.  */
@@ -196,9 +213,9 @@ public:
                      struct ui_file *stream) const override
   {
     type = check_typedef (type);
-    fprintf_filtered (stream, "type %s = ", new_symbol->print_name ());
+    gdb_printf (stream, "type %s = ", new_symbol->print_name ());
     type_print (type, "", stream, 0);
-    fprintf_filtered (stream, ";");
+    gdb_printf (stream, ";");
   }
 
   /* See language.h.  */
This page took 0.027835 seconds and 4 git commands to generate.