]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Add space in name of Rust tuple type
authorTom Tromey <tom@tromey.com>
Sun, 19 Jan 2025 23:57:07 +0000 (16:57 -0700)
committerTom Tromey <tom@tromey.com>
Fri, 31 Jan 2025 16:01:38 +0000 (09:01 -0700)
The Rust compiler emits tuple type names with a space after the comma,
like "(i32, f64)".  This changes rust-parse.c to follow.  This isn't
ideal -- probably the DWARF reader should canonicalize these names --
but it is a bit more robust if symbol lookup should change; and anyway
this feature of gdb is probably rarely used.

gdb/rust-parse.c

index 490adb378b36d76a957b9c730e077480d8668dc8..e25ae54ba8e93e1638e32b523ac71a870464c0e5 100644 (file)
@@ -1773,7 +1773,7 @@ rust_parser::parse_tuple_type ()
       std::string type_name = type_to_string (types[i]);
 
       if (i > 0)
-       obstack_1grow (&obstack, ',');
+       obstack_grow_str (&obstack, ", ");
       obstack_grow_str (&obstack, type_name.c_str ());
     }