Fix two latent Rust bugs
authorTom Tromey <tom@tromey.com>
Fri, 24 Apr 2020 21:35:01 +0000 (15:35 -0600)
committerTom Tromey <tromey@adacore.com>
Fri, 24 Apr 2020 21:35:02 +0000 (15:35 -0600)
Two methods on general_symbol_info did not handle the language_rust
case.  I don't think these problems can be noticed with the current
code (which is why the bugs went unnoticed), but a future patch will
change this.

gdb/ChangeLog
2020-04-24  Tom Tromey  <tom@tromey.com>

* symtab.c (general_symbol_info::natural_name)
(general_symbol_info::demangled_name): Check for language_rust.

gdb/ChangeLog
gdb/symtab.c

index 6122e3173c09ca5e9ada44963fbfa97728a1ca8e..6a8d82fd5ac6e44dd92df86161df1bb27c5bcb2c 100644 (file)
@@ -1,3 +1,8 @@
+2020-04-24  Tom Tromey  <tom@tromey.com>
+
+       * symtab.c (general_symbol_info::natural_name)
+       (general_symbol_info::demangled_name): Check for language_rust.
+
 2020-04-24  Tom Tromey  <tom@tromey.com>
 
        * dwarf2/read.c (dw2_linkage_name): Move Rust "{" hack here...
index c9c75e94182242c32e1c71afecf6628e6cd65f6a..7dd41fb4f32afe382afabe481af8382618e332f9 100644 (file)
@@ -975,6 +975,7 @@ general_symbol_info::natural_name () const
     case language_go:
     case language_objc:
     case language_fortran:
+    case language_rust:
       if (symbol_get_demangled_name (this) != NULL)
        return symbol_get_demangled_name (this);
       break;
@@ -1000,6 +1001,7 @@ general_symbol_info::demangled_name () const
     case language_go:
     case language_objc:
     case language_fortran:
+    case language_rust:
       dem_name = symbol_get_demangled_name (this);
       break;
     case language_ada: