[review v7] gdb/fortran: array stride support

Andrew Burgess (Code Review) gerrit@gnutoolchain-gerrit.osci.io
Fri Nov 29 23:35:00 GMT 2019


Andrew Burgess has posted comments on this change.

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


Patch Set 7:

(1 comment)

| --- gdb/gdbtypes.c
| +++ gdb/gdbtypes.c
| @@ -2017,0 +2061,19 @@ resolve_dynamic_range (struct type *dyn_range_type,
| +    {
| +      stride.kind = PROP_CONST;
| +      stride.data.const_val = value;
| +
| +      /* If we have a bit stride that is not a multiple of the byte stride
| +	 then I really don't think this is going to work with current GDB.
| +	 The array indexing code in GDB seems to be pretty heavily tied to
| +	 byte offsets right now.  If this comes up then we warn the user
| +	 and set up a known incorrect stride.  */
| +      if (!byte_stride_p && (value % HOST_CHAR_BIT) != 0)

PS4, Line 2070:

OK, I see.  I'll get this change made ASAP.  Thanks.

| +	error (_("bit strides that are not a multiple of the byte size "
| +		 "are currently not supported"));
| +    }
| +  else
| +    {
| +      stride.kind = PROP_UNDEFINED;
| +      stride.data.const_val = 0;
| +      byte_stride_p = true;
| +    }

-- 
Gerrit-Project: binutils-gdb
Gerrit-Branch: master
Gerrit-Change-Id: I9af2bcd1f2d4c56f76f5f3f9f89d8f06bef10d9a
Gerrit-Change-Number: 627
Gerrit-PatchSet: 7
Gerrit-Owner: Andrew Burgess <andrew.burgess@embecosm.com>
Gerrit-Reviewer: Andrew Burgess <andrew.burgess@embecosm.com>
Gerrit-CC: Simon Marchi <simon.marchi@polymtl.ca>
Gerrit-CC: Tom Tromey <tromey@sourceware.org>
Gerrit-Comment-Date: Fri, 29 Nov 2019 23:35:11 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Andrew Burgess <andrew.burgess@embecosm.com>
Comment-In-Reply-To: Simon Marchi <simon.marchi@polymtl.ca>
Gerrit-MessageType: comment



More information about the Gdb-patches mailing list