public inbox for gdb-cvs@sourceware.org
help / color / mirror / Atom feed
* [binutils-gdb] Fix two latent Rust bugs
@ 2020-04-24 21:35 Tom Tromey
  0 siblings, 0 replies; only message in thread
From: Tom Tromey @ 2020-04-24 21:35 UTC (permalink / raw)
  To: gdb-cvs

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=8c87a4527f5102b124ad0128894b1195d80eef73

commit 8c87a4527f5102b124ad0128894b1195d80eef73
Author: Tom Tromey <tom@tromey.com>
Date:   Fri Apr 24 15:35:01 2020 -0600

    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.

Diff:
---
 gdb/ChangeLog | 5 +++++
 gdb/symtab.c  | 2 ++
 2 files changed, 7 insertions(+)

diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 6122e3173c0..6a8d82fd5ac 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -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...
diff --git a/gdb/symtab.c b/gdb/symtab.c
index c9c75e94182..7dd41fb4f32 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:


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-04-24 21:35 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-24 21:35 [binutils-gdb] Fix two latent Rust bugs Tom Tromey

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).