From: Tom Tromey Date: Sun, 19 Jan 2025 23:57:07 +0000 (-0700) Subject: Add space in name of Rust tuple type X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=76848059415bcafb902c6ef7973b27f3894c287b;p=thirdparty%2Fbinutils-gdb.git Add space in name of Rust tuple type 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. --- diff --git a/gdb/rust-parse.c b/gdb/rust-parse.c index 490adb378b3..e25ae54ba8e 100644 --- a/gdb/rust-parse.c +++ b/gdb/rust-parse.c @@ -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 ()); }