[review v2] Make struct symbol inherit from general_symbol_info

Christian Biesinger (Code Review) gerrit@gnutoolchain-gerrit.osci.io
Tue Nov 12 21:20:00 GMT 2019


Christian Biesinger has posted comments on this change.

Change URL: https://gnutoolchain-gerrit.osci.io/r/c/binutils-gdb/+/510
......................................................................


Patch Set 2:

(1 comment)

| --- gdb/symtab.h
| +++ gdb/symtab.h
| @@ -1109,12 +1102,26 @@ struct symbol
| -{
| -
| -  /* The general symbol info required for all types of symbols.  */
| -
| -  struct general_symbol_info ginfo;
| +struct symbol : public general_symbol_info
| +{
| +  symbol ()
| +    {
| +      name = nullptr;
| +      value.ivalue = 0;
| +      language_specific.obstack = nullptr;
| +      language = language_unknown;
| +      ada_mangled = 0;
| +      section = 0;
| +      /* Class-initialization of bitfields is only allowed in C++20.  */
| +      domain = UNDEF_DOMAIN;
| +      aclass_index = 0;
| +      is_objfile_owned = 0;
| +      is_argument = 0;
| +      is_inlined = 0;
| +      maybe_copied = 0;
| +      subclass = SYMBOL_NONE;

PS1, Line 1119:

OK, I made that change and am pushing this now.

| +    }
|  
|    /* Data type of value */
|  
| -  struct type *type;
| +  struct type *type = nullptr;
|  
|    /* The owner of this symbol.
|       Which one to use is defined by symbol.is_objfile_owned.  */

-- 
Gerrit-Project: binutils-gdb
Gerrit-Branch: master
Gerrit-Change-Id: I05b1628455bcce3efaa101e65ef051708d17eb07
Gerrit-Change-Number: 510
Gerrit-PatchSet: 2
Gerrit-Owner: Christian Biesinger <cbiesinger@google.com>
Gerrit-Reviewer: Christian Biesinger <cbiesinger@google.com>
Gerrit-Reviewer: Tom Tromey <tromey@sourceware.org>
Gerrit-Comment-Date: Tue, 12 Nov 2019 21:20:12 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Christian Biesinger <cbiesinger@google.com>
Comment-In-Reply-To: Tom Tromey <tromey@sourceware.org>
Gerrit-MessageType: comment



More information about the Gdb-patches mailing list