aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2020-04-24 15:35:01 -0600
committerTom Tromey <tromey@adacore.com>2020-04-24 15:35:02 -0600
commit8c87a4527f5102b124ad0128894b1195d80eef73 (patch)
tree4fded124417a1e193d6eaeae241d5d94e66f4530
parent787de330ee1471389cad1975eae65e566ad00448 (diff)
downloadgdb-8c87a4527f5102b124ad0128894b1195d80eef73.zip
gdb-8c87a4527f5102b124ad0128894b1195d80eef73.tar.gz
gdb-8c87a4527f5102b124ad0128894b1195d80eef73.tar.bz2
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 <tom@tromey.com> * symtab.c (general_symbol_info::natural_name) (general_symbol_info::demangled_name): Check for language_rust.
-rw-r--r--gdb/ChangeLog5
-rw-r--r--gdb/symtab.c2
2 files changed, 7 insertions, 0 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 6122e31..6a8d82f 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,10 @@
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...
(dwarf2_physname): ... from here.
(partial_die_info::read): Add Rust "{" hack.
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: