diff options
author | Andrew Burgess <andrew.burgess@embecosm.com> | 2020-05-21 17:35:51 +0100 |
---|---|---|
committer | Andrew Burgess <andrew.burgess@embecosm.com> | 2020-09-19 09:48:35 +0100 |
commit | c8d5abea3d9ad20efb2198ec1b639b8e4dc4d8d3 (patch) | |
tree | 0cd187dc483e428bb5fdfc9d4f643433acdc2757 /gdb/testsuite/gdb.fortran/class-allocatable-array.exp | |
parent | 6d81691950f8c4be4a49a85a672255c140e82468 (diff) | |
download | binutils-c8d5abea3d9ad20efb2198ec1b639b8e4dc4d8d3.zip binutils-c8d5abea3d9ad20efb2198ec1b639b8e4dc4d8d3.tar.gz binutils-c8d5abea3d9ad20efb2198ec1b639b8e4dc4d8d3.tar.bz2 |
gdb/fortran: Change whitespace when printing arrays
This commit makes the whitespace usage when printing Fortran arrays
more consistent, and more inline with how we print C arrays.
Currently a 2 dimensional Fotran array is printed like this, I find
the marked whitespace unpleasant:
(( 1, 2, 3) ( 4, 5, 6) )
^ ^ ^
After this commit the same array is printed like this:
((1, 2, 3) (4, 5, 6))
Which seems more inline with how we print C arrays, in the case of C
arrays we don't add extra whitespace before the first element.
gdb/ChangeLog:
* f-valprint.c (f77_print_array_1): Adjust printing of whitespace
for arrays.
gdb/testsuite/ChangeLog:
* gdb.fortran/array-slices.exp: Update expected results.
* gdb.fortran/class-allocatable-array.exp: Likewise.
* gdb.fortran/multi-dim.exp: Likewise.
* gdb.fortran/vla-type.exp: Likewise.
* gdb.mi/mi-vla-fortran.exp: Likewise.
Diffstat (limited to 'gdb/testsuite/gdb.fortran/class-allocatable-array.exp')
-rw-r--r-- | gdb/testsuite/gdb.fortran/class-allocatable-array.exp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/testsuite/gdb.fortran/class-allocatable-array.exp b/gdb/testsuite/gdb.fortran/class-allocatable-array.exp index 9475ba3..cdee73f 100644 --- a/gdb/testsuite/gdb.fortran/class-allocatable-array.exp +++ b/gdb/testsuite/gdb.fortran/class-allocatable-array.exp @@ -40,4 +40,4 @@ gdb_continue_to_breakpoint "Break Here" # cetainly going to fail. gdb_test "print this" " = \\( _data = \[^\r\n\]+, _vptr = \[^\r\n\]+\\)" gdb_test "print this%_data" " = \\(PTR TO -> \\( Type test_type \\)\\) \[^\r\n\]+" -gdb_test "print this%_data%b" " = \\(\\( 1, 2, 3\\) \\( 4, 5, 6\\) \\)" +gdb_test "print this%_data%b" " = \\(\\(1, 2, 3\\) \\(4, 5, 6\\)\\)" |