[binutils-gdb] gdb/objc: fix bug in objc_language::opcode_print_table

Andrew Burgess aburgess@sourceware.org
Wed Dec 23 20:55:07 GMT 2020


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

commit ed5797ee2c17bae5d15204cbfa9a3918c7e4c1a9
Author: Andrew Burgess <andrew.burgess@embecosm.com>
Date:   Fri Oct 30 14:35:47 2020 +0000

    gdb/objc: fix bug in objc_language::opcode_print_table
    
    In this commit:
    
      commit b7c6e27dbbbbe678b2e2f0bf617605e055e1b378
      Date:   Tue Aug 4 17:07:59 2020 +0100
    
          gdb: Convert language_data::la_op_print_tab to a method
    
    A bug was introduced, the objc language now returns the wrong op_print
    table.  Fixed in this commit.
    
    gdb/ChangeLog:
    
            * objc-lang.c (objc_language::opcode_print_table): Return
            objc_op_print_tab.

Diff:
---
 gdb/ChangeLog   | 5 +++++
 gdb/objc-lang.c | 2 +-
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 57d8065bfe3..7ecf1205be7 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,8 @@
+2020-12-23  Andrew Burgess  <andrew.burgess@embecosm.com>
+
+	* objc-lang.c (objc_language::opcode_print_table): Return
+	objc_op_print_tab.
+
 2020-12-23  Andrew Burgess  <andrew.burgess@embecosm.com>
 
 	* p-exp.y (exp): Update call to pascal_is_string_type.
diff --git a/gdb/objc-lang.c b/gdb/objc-lang.c
index 10220c81ec3..8d68af78385 100644
--- a/gdb/objc-lang.c
+++ b/gdb/objc-lang.c
@@ -424,7 +424,7 @@ public:
   /* See language.h.  */
 
   const struct op_print *opcode_print_table () const override
-  { return c_op_print_tab; }
+  { return objc_op_print_tab; }
 };
 
 /* Single instance of the class representing the Objective-C language.  */


More information about the Gdb-cvs mailing list