This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[review] gdb: recognize new DWARF attributes: defaulted, deleted, calling conv.


Tom Tromey has posted comments on this change.

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


Patch Set 1:

(1 comment)

https://gnutoolchain-gerrit.osci.io/r/c/binutils-gdb/+/135/1/gdb/gdbtypes.h 
File gdb/gdbtypes.h:

https://gnutoolchain-gerrit.osci.io/r/c/binutils-gdb/+/135/1/gdb/gdbtypes.h@1101 
PS1, Line 1101: 
 986 | struct cplus_struct_type
     | ...
1092 |        N_TEMPLATE_ARGUMENTS elements.  This is NULL for non-template
1093 |        classes.  */
1094 | 
1095 |     struct symbol **template_arguments;
1096 | 
1097 |     /* * The calling convention for this type, fetched from the
1098 |        DW_AT_calling_convention attribute.  The value is one of the
1099 |        DW_CC enum dwarf_calling_convention constants.  */
1100 | 
1101 |     unsigned calling_convention : 8;

> Same here, I would suggest having our own enum, having the dwarf parser validate the input value and convert it to our enum type.

FWIW I thought we had one other case where we just reused a
DWARF enum in gdbtypes?  It seemed to me that this was ok,
because (1) DWARF is probably a superset of anything else we're
likely to deal with, and (2) if not and something else comes along,
we can always require a new enum at that point.

What do you think of this approach?



-- 
Gerrit-Project: binutils-gdb
Gerrit-Branch: master
Gerrit-Change-Id: I54192f363115b78ec7435a8563b73fcace420765
Gerrit-Change-Number: 135
Gerrit-PatchSet: 1
Gerrit-Owner: Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
Gerrit-Reviewer: Andrew Burgess <andrew.burgess@embecosm.com>
Gerrit-Reviewer: Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
Gerrit-CC: Simon Marchi <simon.marchi@polymtl.ca>
Gerrit-CC: Tom Tromey <tromey@sourceware.org>
Gerrit-Comment-Date: Tue, 29 Oct 2019 22:20:04 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Tom Tromey <tromey@sourceware.org>
Comment-In-Reply-To: Simon Marchi <simon.marchi@polymtl.ca>
Gerrit-MessageType: comment


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]