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 v3] gdb: recognize new DWARF attributes: defaulted, deleted, calling conv.


Simon Marchi has posted comments on this change.

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


Patch Set 3:

(2 comments)

Thanks, this patch LGTM for my part.

https://gnutoolchain-gerrit.osci.io/r/c/binutils-gdb/+/135/2/gdb/dwarf2read.c 
File gdb/dwarf2read.c:

https://gnutoolchain-gerrit.osci.io/r/c/binutils-gdb/+/135/2/gdb/dwarf2read.c@15831 
PS2, Line 15831: 
15822 | is_valid_DW_AT_calling_convention (ULONGEST value)
      | ...
15826 |     case DW_CC_normal:
15827 |     case DW_CC_program:
15828 |     case DW_CC_nocall:
15829 |     case DW_CC_pass_by_reference:
15830 |     case DW_CC_pass_by_value:
15831 >     case DW_CC_lo_user:
15832 >     case DW_CC_hi_user:
15833 |     /* case DW_CC_GNU_renesas_sh: Duplicate of DW_CC_lo_user.  */
15834 |     case DW_CC_GNU_borland_fastcall_i386:
15835 |     /* case DW_CC_GDB_IBM_OpenCL: Duplicate of DW_CC_hi_user.  */
15836 |       return true;
15837 |     }

> I don' think we should include lo_user and hi_user in the switch, since they are not "real" values. […]

Done


https://gnutoolchain-gerrit.osci.io/r/c/binutils-gdb/+/135/2/gdb/dwarf2read.c@15928 
PS2, Line 15928: 
15857 | read_structure_type (struct die_info *die, struct dwarf2_cu *cu)
      | ...
15923 |     TYPE_DECLARED_CLASS (type) = 1;
15924 | 
15925 |   /* Store the calling convention in the type if it's available in
15926 |      the die.  Otherwise the calling convention remains set to
15927 |      the default value DW_CC_normal.  */
15928 >   attr = dwarf2_attr (die, DW_AT_calling_convention, cu);
15929 |   if (attr != nullptr
15930 |       && is_valid_DW_AT_calling_convention (DW_UNSND (attr)))
15931 |     {
15932 |       ALLOCATE_CPLUS_STRUCT_TYPE (type);
15933 |       TYPE_CPLUS_CALLING_CONVENTION (type)

> According to table 5. […]

Done



-- 
Gerrit-Project: binutils-gdb
Gerrit-Branch: master
Gerrit-Change-Id: I54192f363115b78ec7435a8563b73fcace420765
Gerrit-Change-Number: 135
Gerrit-PatchSet: 3
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: Thu, 31 Oct 2019 20:12:18 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
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]