aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.fortran
diff options
context:
space:
mode:
authorAndrew Burgess <andrew.burgess@embecosm.com>2019-02-17 00:37:20 +0000
committerAndrew Burgess <andrew.burgess@embecosm.com>2019-04-30 10:36:56 +0100
commitf1fdc960664c24d911d6189b94e5c054b4bb9053 (patch)
treed561d6e01f2adc4d032f35157eca9831f11c4357 /gdb/testsuite/gdb.fortran
parentbf7a4de1722a63c8b017d010e75d5e9e5e622f36 (diff)
downloadgdb-f1fdc960664c24d911d6189b94e5c054b4bb9053.zip
gdb-f1fdc960664c24d911d6189b94e5c054b4bb9053.tar.gz
gdb-f1fdc960664c24d911d6189b94e5c054b4bb9053.tar.bz2
gdb/fortran: Update rules for printing whitespace in types
The whitespace produced as types are printed seems inconsistent. This commit updates the rules in an attempt to make whitespace more balanced and consistent. Expected results are updated. gdb/ChangeLog: * f-typeprint.c (f_print_type): Update rules for printing whitespace. (f_type_print_varspec_suffix): Likewise. gdb/testsuite/ChangeLog: * gdb.fortran/ptr-indentation.exp: Update expected results. * gdb.fortran/ptype-on-functions.exp: Likewise. * gdb.fortran/vla-ptr-info.exp: Likewise. * gdb.fortran/vla-value.exp: Likewise.
Diffstat (limited to 'gdb/testsuite/gdb.fortran')
-rw-r--r--gdb/testsuite/gdb.fortran/ptr-indentation.exp2
-rw-r--r--gdb/testsuite/gdb.fortran/ptype-on-functions.exp2
-rw-r--r--gdb/testsuite/gdb.fortran/vla-ptr-info.exp2
-rw-r--r--gdb/testsuite/gdb.fortran/vla-value.exp8
4 files changed, 7 insertions, 7 deletions
diff --git a/gdb/testsuite/gdb.fortran/ptr-indentation.exp b/gdb/testsuite/gdb.fortran/ptr-indentation.exp
index b0eb941..0c5d225 100644
--- a/gdb/testsuite/gdb.fortran/ptr-indentation.exp
+++ b/gdb/testsuite/gdb.fortran/ptr-indentation.exp
@@ -37,5 +37,5 @@ gdb_continue_to_breakpoint "BP1"
gdb_test "ptype tinsta" \
[multi_line "type = Type tuserdef" \
" $int :: i" \
- " PTR TO -> \\( $real :: ptr\\)" \
+ " PTR TO -> \\( $real :: ptr \\)" \
"End Type tuserdef"]
diff --git a/gdb/testsuite/gdb.fortran/ptype-on-functions.exp b/gdb/testsuite/gdb.fortran/ptype-on-functions.exp
index 4ce7862..5288286 100644
--- a/gdb/testsuite/gdb.fortran/ptype-on-functions.exp
+++ b/gdb/testsuite/gdb.fortran/ptype-on-functions.exp
@@ -42,4 +42,4 @@ gdb_test "ptype say_numbers" \
"type = void \\(integer\\(kind=4\\), integer\\(kind=4\\), integer\\(kind=4\\)\\)"
gdb_test "ptype fun_ptr" \
- "type = PTR TO -> \\( integer\\(kind=4\\) \\(\\)\\(REF TO -> \\( integer\\(kind=4\\) \\)\\)\\)"
+ "type = PTR TO -> \\( integer\\(kind=4\\) \\(\\) \\(REF TO -> \\( integer\\(kind=4\\) \\)\\) \\)"
diff --git a/gdb/testsuite/gdb.fortran/vla-ptr-info.exp b/gdb/testsuite/gdb.fortran/vla-ptr-info.exp
index 58f3395..6b9625a 100644
--- a/gdb/testsuite/gdb.fortran/vla-ptr-info.exp
+++ b/gdb/testsuite/gdb.fortran/vla-ptr-info.exp
@@ -28,5 +28,5 @@ if ![runto_main] {
# Check the status of a pointer to a dynamic array.
gdb_breakpoint [gdb_get_line_number "pvla-associated"]
gdb_continue_to_breakpoint "pvla-associated"
-gdb_test "print &pvla" " = \\(PTR TO -> \\( real\\(kind=4\\) \\(10,10,10\\)\\)\\) ${hex}" \
+gdb_test "print &pvla" " = \\(PTR TO -> \\( real\\(kind=4\\) \\(10,10,10\\) \\)\\) ${hex}" \
"print pvla pointer information"
diff --git a/gdb/testsuite/gdb.fortran/vla-value.exp b/gdb/testsuite/gdb.fortran/vla-value.exp
index 3582d47..507137b 100644
--- a/gdb/testsuite/gdb.fortran/vla-value.exp
+++ b/gdb/testsuite/gdb.fortran/vla-value.exp
@@ -35,7 +35,7 @@ gdb_breakpoint [gdb_get_line_number "vla1-init"]
gdb_continue_to_breakpoint "vla1-init"
gdb_test "print vla1" " = <not allocated>" "print non-allocated vla1"
gdb_test "print &vla1" \
- " = \\\(PTR TO -> \\\( $real \\\(<not allocated>\\\)\\\)\\\) $hex" \
+ " = \\\(PTR TO -> \\\( $real \\\(<not allocated>\\\) \\\)\\\) $hex" \
"print non-allocated &vla1"
gdb_test "print vla1(1,1,1)" "no such vector element \\\(vector not allocated\\\)" \
"print member in non-allocated vla1 (1)"
@@ -56,7 +56,7 @@ with_timeout_factor 15 {
"step over value assignment of vla1"
}
gdb_test "print &vla1" \
- " = \\\(PTR TO -> \\\( $real \\\(10,10,10\\\)\\\)\\\) $hex" \
+ " = \\\(PTR TO -> \\\( $real \\\(10,10,10\\\) \\\)\\\) $hex" \
"print allocated &vla1"
gdb_test "print vla1(3, 6, 9)" " = 1311" "print allocated vla1(3,6,9)"
gdb_test "print vla1(1, 3, 8)" " = 1311" "print allocated vla1(1,3,8)"
@@ -76,7 +76,7 @@ gdb_test "print vla1(9, 9, 9)" " = 999" \
# Try to access values in undefined pointer to VLA (dangling)
gdb_test "print pvla" " = <not associated>" "print undefined pvla"
gdb_test "print &pvla" \
- " = \\\(PTR TO -> \\\( $real \\\(<not associated>\\\)\\\)\\\) $hex" \
+ " = \\\(PTR TO -> \\\( $real \\\(<not associated>\\\) \\\)\\\) $hex" \
"print non-associated &pvla"
gdb_test "print pvla(1, 3, 8)" "no such vector element \\\(vector not associated\\\)" \
"print undefined pvla(1,3,8)"
@@ -85,7 +85,7 @@ gdb_test "print pvla(1, 3, 8)" "no such vector element \\\(vector not associated
gdb_breakpoint [gdb_get_line_number "pvla-associated"]
gdb_continue_to_breakpoint "pvla-associated"
gdb_test "print &pvla" \
- " = \\\(PTR TO -> \\\( $real \\\(10,10,10\\\)\\\)\\\) $hex" \
+ " = \\\(PTR TO -> \\\( $real \\\(10,10,10\\\) \\\)\\\) $hex" \
"print associated &pvla"
gdb_test "print pvla(3, 6, 9)" " = 42" "print associated pvla(3,6,9)"
gdb_test "print pvla(1, 3, 8)" " = 1001" "print associated pvla(1,3,8)"