From 8c87a4527f5102b124ad0128894b1195d80eef73 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Fri, 24 Apr 2020 15:35:01 -0600 Subject: Fix two latent Rust bugs 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 * symtab.c (general_symbol_info::natural_name) (general_symbol_info::demangled_name): Check for language_rust. --- gdb/symtab.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'gdb/symtab.c') diff --git a/gdb/symtab.c b/gdb/symtab.c index c9c75e9..7dd41fb 100644 --- a/gdb/symtab.c +++ b/gdb/symtab.c @@ -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: -- cgit v1.1