public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Jan Kratochvil <jan.kratochvil@redhat.com>
To: git-commits@fedoraproject.org
Subject: [rpms/gdb] gdb-17.2-rebase-f44: Align gdb-vla-intel-fortran-vla-strings.patch more to upstream,
Date: Sun, 28 Jun 2026 00:00:12 GMT [thread overview]
Message-ID: <178260481206.1.8904571714554969745.rpms-gdb-de24db0eb7f1@fedoraproject.org> (raw)
A new commit has been pushed.
Repo : rpms/gdb
Branch : gdb-17.2-rebase-f44
Commit : de24db0eb7f1f49711e35b6841ad4952cf5112e7
Author : Jan Kratochvil <jan.kratochvil@redhat.com>
Date : 2021-03-04T20:43:11+01:00
Stats : +62/-214 in 3 file(s)
URL : https://src.fedoraproject.org/rpms/gdb/c/de24db0eb7f1f49711e35b6841ad4952cf5112e7?branch=gdb-17.2-rebase-f44
Log:
Align gdb-vla-intel-fortran-vla-strings.patch more to upstream,
particularly whitespaces in Fortran types printing.
---
diff --git a/gdb-vla-intel-fortran-vla-strings.patch b/gdb-vla-intel-fortran-vla-strings.patch
index 0682b02..208671a 100644
--- a/gdb-vla-intel-fortran-vla-strings.patch
+++ b/gdb-vla-intel-fortran-vla-strings.patch
@@ -217,15 +217,7 @@ diff --git a/gdb/dwarf2/read.c b/gdb/dwarf2/read.c
/* Use 1 as a fallback length if we have nothing else. */
length = 1;
}
-@@ -17603,6 +17673,7 @@ read_tag_string_type (struct die_info *die, struct dwarf2_cu *cu)
- low_bound.set_const_val (1);
- range_type = create_range_type (NULL, index_type, &low_bound, &prop, 0);
- }
-+
- char_type = language_string_char_type (cu->language_defn, gdbarch);
- type = create_string_type (NULL, char_type, range_type);
-
-@@ -18078,7 +18149,8 @@ read_base_type (struct die_info *die, struct dwarf2_cu *cu)
+@@ -18078,7 +18148,8 @@ read_base_type (struct die_info *die, struct dwarf2_cu *cu)
static int
attr_to_dynamic_prop (const struct attribute *attr, struct die_info *die,
struct dwarf2_cu *cu, struct dynamic_prop *prop,
@@ -235,7 +227,7 @@ diff --git a/gdb/dwarf2/read.c b/gdb/dwarf2/read.c
{
struct dwarf2_property_baton *baton;
dwarf2_per_objfile *per_objfile = cu->per_objfile;
-@@ -18108,6 +18180,26 @@ attr_to_dynamic_prop (const struct attribute *attr, struct die_info *die,
+@@ -18108,6 +18179,26 @@ attr_to_dynamic_prop (const struct attribute *attr, struct die_info *die,
break;
}
@@ -262,7 +254,7 @@ diff --git a/gdb/dwarf2/read.c b/gdb/dwarf2/read.c
prop->set_locexpr (baton);
gdb_assert (prop->baton () != NULL);
}
-@@ -18142,11 +18234,31 @@ attr_to_dynamic_prop (const struct attribute *attr, struct die_info *die,
+@@ -18142,11 +18233,31 @@ attr_to_dynamic_prop (const struct attribute *attr, struct die_info *die,
baton->property_type = die_type (target_die, target_cu);
baton->locexpr.per_cu = cu->per_cu;
baton->locexpr.per_objfile = per_objfile;
@@ -297,7 +289,7 @@ diff --git a/gdb/dwarf2/read.c b/gdb/dwarf2/read.c
}
else
{
-@@ -18308,8 +18420,8 @@ read_subrange_type (struct die_info *die, struct dwarf2_cu *cu)
+@@ -18308,8 +18419,8 @@ read_subrange_type (struct die_info *die, struct dwarf2_cu *cu)
}
attr = dwarf2_attr (die, DW_AT_lower_bound, cu);
@@ -308,7 +300,7 @@ diff --git a/gdb/dwarf2/read.c b/gdb/dwarf2/read.c
else if (!low_default_is_valid)
complaint (_("Missing DW_AT_lower_bound "
"- DIE at %s [in module %s]"),
-@@ -18318,10 +18430,10 @@ read_subrange_type (struct die_info *die, struct dwarf2_cu *cu)
+@@ -18318,10 +18429,10 @@ read_subrange_type (struct die_info *die, struct dwarf2_cu *cu)
struct attribute *attr_ub, *attr_count;
attr = attr_ub = dwarf2_attr (die, DW_AT_upper_bound, cu);
@@ -321,7 +313,7 @@ diff --git a/gdb/dwarf2/read.c b/gdb/dwarf2/read.c
{
/* If bounds are constant do the final calculation here. */
if (low.kind () == PROP_CONST && high.kind () == PROP_CONST)
-@@ -18372,7 +18484,7 @@ read_subrange_type (struct die_info *die, struct dwarf2_cu *cu)
+@@ -18372,7 +18483,7 @@ read_subrange_type (struct die_info *die, struct dwarf2_cu *cu)
{
struct type *prop_type = cu->addr_sized_int_type (false);
attr_to_dynamic_prop (attr_byte_stride, die, cu, &byte_stride_prop,
@@ -330,7 +322,7 @@ diff --git a/gdb/dwarf2/read.c b/gdb/dwarf2/read.c
}
struct dynamic_prop bit_stride_prop;
-@@ -18392,7 +18504,7 @@ read_subrange_type (struct die_info *die, struct dwarf2_cu *cu)
+@@ -18392,7 +18503,7 @@ read_subrange_type (struct die_info *die, struct dwarf2_cu *cu)
{
struct type *prop_type = cu->addr_sized_int_type (false);
attr_to_dynamic_prop (attr_bit_stride, die, cu, &bit_stride_prop,
@@ -339,7 +331,7 @@ diff --git a/gdb/dwarf2/read.c b/gdb/dwarf2/read.c
}
}
-@@ -24424,7 +24536,7 @@ set_die_type (struct die_info *die, struct type *type, struct dwarf2_cu *cu)
+@@ -24424,7 +24535,7 @@ set_die_type (struct die_info *die, struct type *type, struct dwarf2_cu *cu)
if (attr != NULL)
{
struct type *prop_type = cu->addr_sized_int_type (false);
@@ -348,7 +340,7 @@ diff --git a/gdb/dwarf2/read.c b/gdb/dwarf2/read.c
type->add_dyn_prop (DYN_PROP_ALLOCATED, prop);
}
-@@ -24433,13 +24545,13 @@ set_die_type (struct die_info *die, struct type *type, struct dwarf2_cu *cu)
+@@ -24433,13 +24544,13 @@ set_die_type (struct die_info *die, struct type *type, struct dwarf2_cu *cu)
if (attr != NULL)
{
struct type *prop_type = cu->addr_sized_int_type (false);
@@ -387,15 +379,6 @@ diff --git a/gdb/f-typeprint.c b/gdb/f-typeprint.c
}
}
-@@ -249,7 +250,7 @@ f_type_print_varspec_suffix (struct type *type, struct ui_file *stream,
- case TYPE_CODE_REF:
- f_type_print_varspec_suffix (TYPE_TARGET_TYPE (type), stream, 0, 1, 0,
- arrayprint_recurse_level, false);
-- fprintf_filtered (stream, " )");
-+ fprintf_filtered (stream, ")");
- break;
-
- case TYPE_CODE_FUNC:
diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c
--- a/gdb/gdbtypes.c
+++ b/gdb/gdbtypes.c
@@ -570,15 +553,15 @@ new file mode 100644
+
+gdb_breakpoint [gdb_get_line_number "Before pointer assignment"]
+gdb_continue_to_breakpoint "Before pointer assignment"
-+gdb_test "print logp" "= \\(PTR TO -> \\( $logical\\)\\) 0x0" "print logp, not associated"
++gdb_test "print logp" "= \\(PTR TO -> \\( $logical \\)\\) 0x0" "print logp, not associated"
+gdb_test "print *logp" "Cannot access memory at address 0x0" "print *logp, not associated"
-+gdb_test "print comp" "= \\(PTR TO -> \\( $complex\\)\\) 0x0" "print comp, not associated"
++gdb_test "print comp" "= \\(PTR TO -> \\( $complex \\)\\) 0x0" "print comp, not associated"
+gdb_test "print *comp" "Cannot access memory at address 0x0" "print *comp, not associated"
-+gdb_test "print charp" "= \\(PTR TO -> \\( character\\*1\\)\\) 0x0" "print charp, not associated"
++gdb_test "print charp" "= \\(PTR TO -> \\( character\\*1 \\)\\) 0x0" "print charp, not associated"
+gdb_test "print *charp" "Cannot access memory at address 0x0" "print *charp, not associated"
-+gdb_test "print charap" "= \\(PTR TO -> \\( character\\*3\\)\\) 0x0" "print charap, not associated"
++gdb_test "print charap" "= \\(PTR TO -> \\( character\\*3 \\)\\) 0x0" "print charap, not associated"
+gdb_test "print *charap" "Cannot access memory at address 0x0" "print *charap, not associated"
-+gdb_test "print intp" "= \\(PTR TO -> \\( $int\\)\\) 0x0" "print intp, not associated"
++gdb_test "print intp" "= \\(PTR TO -> \\( $int \\)\\) 0x0" "print intp, not associated"
+gdb_test "print *intp" "Cannot access memory at address 0x0" "print *intp, not associated"
+set test "print intap, not associated"
+gdb_test_multiple "print intap" $test {
@@ -589,9 +572,9 @@ new file mode 100644
+ pass $test
+ }
+}
-+gdb_test "print realp" "= \\(PTR TO -> \\( $real\\)\\) 0x0" "print realp, not associated"
++gdb_test "print realp" "= \\(PTR TO -> \\( $real \\)\\) 0x0" "print realp, not associated"
+gdb_test "print *realp" "Cannot access memory at address 0x0" "print *realp, not associated"
-+gdb_test "print \$my_var = intp" "= \\(PTR TO -> \\( $int\\)\\) 0x0"
++gdb_test "print \$my_var = intp" "= \\(PTR TO -> \\( $int \\)\\) 0x0"
+set test "print cyclicp1, not associated"
+gdb_test_multiple "print cyclicp1" $test {
+ -re "= \\( i = -?\\d+, p = 0x0 \\)\r\n$gdb_prompt $" {
@@ -603,10 +586,10 @@ new file mode 100644
+}
+set test "print cyclicp1%p, not associated"
+gdb_test_multiple "print cyclicp1%p" $test {
-+ -re "= \\(PTR TO -> \\( Type typewithpointer\\)\\) 0x0\r\n$gdb_prompt $" {
++ -re "= \\(PTR TO -> \\( Type typewithpointer \\)\\) 0x0\r\n$gdb_prompt $" {
+ pass $test
+ }
-+ -re "= \\(PTR TO -> \\( Type typewithpointer\\)\\) <not associated>\r\n$gdb_prompt $" {
++ -re "= \\(PTR TO -> \\( Type typewithpointer \\)\\) <not associated>\r\n$gdb_prompt $" {
+ pass $test
+ }
+}
@@ -619,15 +602,15 @@ new file mode 100644
+
+gdb_breakpoint [gdb_get_line_number "After value assignment"]
+gdb_continue_to_breakpoint "After value assignment"
-+gdb_test "print logp" "= \\(PTR TO -> \\( $logical\\)\\) $hex\( <.*>\)?"
++gdb_test "print logp" "= \\(PTR TO -> \\( $logical \\)\\) $hex\( <.*>\)?"
+gdb_test "print *logp" "= \\.TRUE\\."
-+gdb_test "print comp" "= \\(PTR TO -> \\( $complex\\)\\) $hex\( <.*>\)?"
++gdb_test "print comp" "= \\(PTR TO -> \\( $complex \\)\\) $hex\( <.*>\)?"
+gdb_test "print *comp" "= \\(1,2\\)"
-+gdb_test "print charp" "= \\(PTR TO -> \\( character\\*1\\)\\) $hex\( <.*>\)?"
++gdb_test "print charp" "= \\(PTR TO -> \\( character\\*1 \\)\\) $hex\( <.*>\)?"
+gdb_test "print *charp" "= 'a'"
-+gdb_test "print charap" "= \\(PTR TO -> \\( character\\*3\\)\\) $hex\( <.*>\)?"
++gdb_test "print charap" "= \\(PTR TO -> \\( character\\*3 \\)\\) $hex\( <.*>\)?"
+gdb_test "print *charap" "= 'abc'"
-+gdb_test "print intp" "= \\(PTR TO -> \\( $int\\)\\) $hex\( <.*>\)?"
++gdb_test "print intp" "= \\(PTR TO -> \\( $int \\)\\) $hex\( <.*>\)?"
+gdb_test "print *intp" "= 10"
+set test_name "print intap, associated"
+gdb_test_multiple "print intap" $test_name {
@@ -649,16 +632,16 @@ new file mode 100644
+ pass $test_name
+ }
+}
-+gdb_test "print realp" "= \\(PTR TO -> \\( $real\\)\\) $hex\( <.*>\)?"
++gdb_test "print realp" "= \\(PTR TO -> \\( $real \\)\\) $hex\( <.*>\)?"
+gdb_test "print *realp" "= 3\\.14000\\d+"
-+gdb_test "print arrayOfPtr(2)%p" "= \\(PTR TO -> \\( Type two\\)\\) $hex\( <.*>\)?"
++gdb_test "print arrayOfPtr(2)%p" "= \\(PTR TO -> \\( Type two \\)\\) $hex\( <.*>\)?"
+gdb_test "print *(arrayOfPtr(2)%p)" "= \\( ivla1 = \\(11, 12, 13\\), ivla2 = \\(\\( 211, 221\\) \\( 212, 222\\) \\) \\)"
+set test_name "print arrayOfPtr(3)%p"
+gdb_test_multiple $test_name $test_name {
-+ -re "= \\(PTR TO -> \\( Type two\\)\\) <not associated>\r\n$gdb_prompt $" {
++ -re "= \\(PTR TO -> \\( Type two \\)\\) <not associated>\r\n$gdb_prompt $" {
+ pass $test_name
+ }
-+ -re "= \\(PTR TO -> \\( Type two\\)\\) 0x0\r\n$gdb_prompt $" {
++ -re "= \\(PTR TO -> \\( Type two \\)\\) 0x0\r\n$gdb_prompt $" {
+ pass $test_name
+ }
+}
@@ -672,10 +655,10 @@ new file mode 100644
+ }
+}
+gdb_test "print cyclicp1" "= \\( i = 1, p = $hex\( <.*>\)? \\)"
-+gdb_test "print cyclicp1%p" "= \\(PTR TO -> \\( Type typewithpointer\\)\\) $hex\( <.*>\)?"
++gdb_test "print cyclicp1%p" "= \\(PTR TO -> \\( Type typewithpointer \\)\\) $hex\( <.*>\)?"
+gdb_test "print *((integer*) &inta + 2)" "= 3" "print temporary pointer, array"
+gdb_test "print *((integer*) &intvla + 3)" "= 4" "print temporary pointer, allocated vla"
-+gdb_test "print \$pc" "= \\(PTR TO -> \\( void \\(\\) \\(\\)\\)\\) $hex <pointers\\+\\d+>" "Print program counter"
++gdb_test "print \$pc" "= \\(PTR TO -> \\( void \\(\\) \\(\\) \\)\\) $hex <pointers\\+\\d+>" "Print program counter"
diff --git a/gdb/testsuite/gdb.fortran/pointers.f90 b/gdb/testsuite/gdb.fortran/pointers.f90
--- a/gdb/testsuite/gdb.fortran/pointers.f90
+++ b/gdb/testsuite/gdb.fortran/pointers.f90
@@ -769,48 +752,14 @@ diff --git a/gdb/testsuite/gdb.fortran/print_type.exp b/gdb/testsuite/gdb.fortra
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
-@@ -42,7 +43,7 @@ set complex [fortran_complex4]
- # matches the string TYPE.
- proc check_pointer_type { var_name type } {
- gdb_test "ptype ${var_name}" \
-- "type = PTR TO -> \\( ${type} \\)"
-+ "type = PTR TO -> \\( ${type}\\)"
- }
-
- gdb_breakpoint [gdb_get_line_number "Before pointer assignment"]
-@@ -87,7 +88,8 @@ gdb_test "ptype twop" \
- [multi_line "type = PTR TO -> \\( Type two" \
- " $int, allocatable :: ivla1\\(:\\)" \
+@@ -89,6 +90,7 @@ gdb_test "ptype twop" \
" $int, allocatable :: ivla2\\(:,:\\)" \
-- "End Type two \\)"]
-+ "End Type two\\)"]
-+
+ "End Type two \\)"]
++
gdb_breakpoint [gdb_get_line_number "After value assignment"]
gdb_continue_to_breakpoint "After value assignment"
-@@ -99,11 +101,11 @@ gdb_test "ptype intv" "type = $int"
- gdb_test "ptype inta" "type = $int \\(10,2\\)"
- gdb_test "ptype realv" "type = $real"
-
--gdb_test "ptype logp" "type = PTR TO -> \\( $logical \\)"
--gdb_test "ptype comp" "type = PTR TO -> \\( $complex \\)"
--gdb_test "ptype charp" "type = PTR TO -> \\( character\\*1 \\)"
--gdb_test "ptype charap" "type = PTR TO -> \\( character\\*3 \\)"
--gdb_test "ptype intp" "type = PTR TO -> \\( $int \\)"
-+gdb_test "ptype logp" "type = PTR TO -> \\( $logical\\)"
-+gdb_test "ptype comp" "type = PTR TO -> \\( $complex\\)"
-+gdb_test "ptype charp" "type = PTR TO -> \\( character\\*1\\)"
-+gdb_test "ptype charap" "type = PTR TO -> \\( character\\*3\\)"
-+gdb_test "ptype intp" "type = PTR TO -> \\( $int\\)"
- set test "ptype intap"
- gdb_test_multiple $test $test {
- -re "type = $int \\(10,2\\)\r\n$gdb_prompt $" {
-@@ -113,4 +115,4 @@ gdb_test_multiple $test $test {
- pass $test
- }
- }
--gdb_test "ptype realp" "type = PTR TO -> \\( $real \\)"
-+gdb_test "ptype realp" "type = PTR TO -> \\( $real\\)"
+ gdb_test "ptype logv" "type = $logical"
diff --git a/gdb/testsuite/gdb.fortran/vla-strings.exp b/gdb/testsuite/gdb.fortran/vla-strings.exp
new file mode 100644
--- /dev/null
@@ -850,7 +799,7 @@ new file mode 100644
+gdb_continue_to_breakpoint "var_char-allocated-1"
+set test "whatis var_char first time"
+gdb_test_multiple "whatis var_char" $test {
-+ -re "type = PTR TO -> \\( character\\*10\\)\r\n$gdb_prompt $" {
++ -re "type = PTR TO -> \\( character\\*10 \\)\r\n$gdb_prompt $" {
+ pass $test
+ }
+ -re "type = character\\*10\r\n$gdb_prompt $" {
@@ -859,7 +808,7 @@ new file mode 100644
+}
+set test "ptype var_char first time"
+gdb_test_multiple "ptype var_char" $test {
-+ -re "type = PTR TO -> \\( character\\*10\\)\r\n$gdb_prompt $" {
++ -re "type = PTR TO -> \\( character\\*10 \\)\r\n$gdb_prompt $" {
+ pass $test
+ }
+ -re "type = character\\*10\r\n$gdb_prompt $" {
@@ -877,7 +826,7 @@ new file mode 100644
+gdb_continue_to_breakpoint "var_char-filled-1"
+set test "print var_char, var_char-filled-1"
+gdb_test_multiple "print var_char" $test {
-+ -re "= \\(PTR TO -> \\( character\\*3\\)\\) $hex\r\n$gdb_prompt $" {
++ -re "= \\(PTR TO -> \\( character\\*3 \\)\\) $hex\r\n$gdb_prompt $" {
+ gdb_test "print *var_char" "= 'foo'" "print *var_char, var_char-filled-1"
+ pass $test
+ }
@@ -887,7 +836,7 @@ new file mode 100644
+}
+set test "ptype var_char, var_char-filled-1"
+gdb_test_multiple "ptype var_char" $test {
-+ -re "type = PTR TO -> \\( character\\*3\\)\r\n$gdb_prompt $" {
++ -re "type = PTR TO -> \\( character\\*3 \\)\r\n$gdb_prompt $" {
+ pass $test
+ }
+ -re "type = character\\*3\r\n$gdb_prompt $" {
@@ -902,7 +851,7 @@ new file mode 100644
+gdb_continue_to_breakpoint "var_char-filled-2"
+set test "print var_char, var_char-filled-2"
+gdb_test_multiple "print var_char" $test {
-+ -re "= \\(PTR TO -> \\( character\\*6\\)\\) $hex\r\n$gdb_prompt $" {
++ -re "= \\(PTR TO -> \\( character\\*6 \\)\\) $hex\r\n$gdb_prompt $" {
+ gdb_test "print *var_char" "= 'foobar'" "print *var_char, var_char-filled-2"
+ pass $test
+ }
@@ -912,7 +861,7 @@ new file mode 100644
+}
+set test "ptype var_char, var_char-filled-2"
+gdb_test_multiple "ptype var_char" $test {
-+ -re "type = PTR TO -> \\( character\\*6\\)\r\n$gdb_prompt $" {
++ -re "type = PTR TO -> \\( character\\*6 \\)\r\n$gdb_prompt $" {
+ pass $test
+ }
+ -re "type = character\\*6\r\n$gdb_prompt $" {
@@ -963,45 +912,6 @@ new file mode 100644
+ var_char_p => null()
+ l = associated(var_char_p) ! var_char_p-not-associated
+end program vla_strings
-diff --git a/gdb/testsuite/gdb.fortran/vla-value.exp b/gdb/testsuite/gdb.fortran/vla-value.exp
---- a/gdb/testsuite/gdb.fortran/vla-value.exp
-+++ b/gdb/testsuite/gdb.fortran/vla-value.exp
-@@ -37,7 +37,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, allocatable \\\(:,:,:\\\) \\\)\\\) $hex" \
-+ " = \\\(PTR TO -> \\\( $real, allocatable \\\(:,:,:\\\)\\\)\\\) $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)"
-@@ -58,7 +58,7 @@ with_timeout_factor 15 {
- "step over value assignment of vla1"
- }
- gdb_test "print &vla1" \
-- " = \\\(PTR TO -> \\\( $real, allocatable \\\(10,10,10\\\) \\\)\\\) $hex" \
-+ " = \\\(PTR TO -> \\\( $real, allocatable \\\(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)"
-@@ -78,7 +78,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 \\\(:,:,:\\\) \\\)\\\) $hex" \
-+ " = \\\(PTR TO -> \\\( $real \\\(:,:,:\\\)\\\)\\\) $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)"
-@@ -87,7 +87,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)"
diff --git a/gdb/typeprint.c b/gdb/typeprint.c
--- a/gdb/typeprint.c
+++ b/gdb/typeprint.c
@@ -1056,19 +966,3 @@ diff --git a/gdb/valops.c b/gdb/valops.c
}
arg2 = value_at_lazy (enc_type, base_addr);
enc_type = value_type (arg2);
-diff --git a/gdb/valprint.c b/gdb/valprint.c
---- a/gdb/valprint.c
-+++ b/gdb/valprint.c
-@@ -1046,12 +1046,6 @@ value_check_printable (struct value *val, struct ui_file *stream,
- return 0;
- }
-
-- if (type_not_associated (value_type (val)))
-- {
-- val_print_not_associated (stream);
-- return 0;
-- }
--
- if (type_not_allocated (value_type (val)))
- {
- val_print_not_allocated (stream);
diff --git a/gdb-vla-intel-tests.patch b/gdb-vla-intel-tests.patch
index bfde742..c8ed401 100644
--- a/gdb-vla-intel-tests.patch
+++ b/gdb-vla-intel-tests.patch
@@ -5,28 +5,6 @@ Subject: gdb-vla-intel-tests.patch
;;=fedoratest
-diff --git a/gdb/testsuite/gdb.fortran/ptr-indentation.exp b/gdb/testsuite/gdb.fortran/ptr-indentation.exp
---- 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
---- a/gdb/testsuite/gdb.fortran/ptype-on-functions.exp
-+++ b/gdb/testsuite/gdb.fortran/ptype-on-functions.exp
-@@ -42,7 +42,7 @@ 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\\)\\)\\)\\)"
-
- gdb_test "ptype say_string" \
- "type = void \\(character\\*\\(\\*\\), integer\\(kind=\\d+\\)\\)"
diff --git a/gdb/testsuite/gdb.fortran/vla-func.exp b/gdb/testsuite/gdb.fortran/vla-func.exp
new file mode 100644
--- /dev/null
@@ -169,16 +147,6 @@ new file mode 100644
+
+ ret = .TRUE. ! func2-returned
+end program vla_func
-diff --git a/gdb/testsuite/gdb.fortran/vla-ptr-info.exp b/gdb/testsuite/gdb.fortran/vla-ptr-info.exp
---- a/gdb/testsuite/gdb.fortran/vla-ptr-info.exp
-+++ b/gdb/testsuite/gdb.fortran/vla-ptr-info.exp
-@@ -33,5 +33,5 @@ set real4 [fortran_real4]
- # 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 -> \\( $real4 \\(10,10,10\\) \\)\\) ${hex}" \
-+gdb_test "print &pvla" " = \\(PTR TO -> \\( $real4 \\(10,10,10\\)\\)\\) ${hex}" \
- "print pvla pointer information"
diff --git a/gdb/testsuite/gdb.fortran/vla-stringsold.exp b/gdb/testsuite/gdb.fortran/vla-stringsold.exp
new file mode 100644
--- /dev/null
@@ -217,11 +185,11 @@ new file mode 100644
+gdb_breakpoint [gdb_get_line_number "var_char-allocated-1"]
+gdb_continue_to_breakpoint "var_char-allocated-1"
+gdb_test "print var_char" \
-+ " = \\(PTR TO -> \\( character\\*10\\)\\) ${hex}" \
++ " = \\(PTR TO -> \\( character\\*10 \\)\\) ${hex}" \
+ "print var_char after allocated first time"
-+gdb_test "whatis var_char" "type = PTR TO -> \\( character\\*10\\)" \
++gdb_test "whatis var_char" "type = PTR TO -> \\( character\\*10 \\)" \
+ "whatis var_char first time"
-+gdb_test "ptype var_char" "type = PTR TO -> \\( character\\*10\\)" \
++gdb_test "ptype var_char" "type = PTR TO -> \\( character\\*10 \\)" \
+ "ptype var_char first time"
+gdb_test "next" "\\d+.*var_char = 'foo'.*" \
+ "next to allocation status of var_char"
@@ -230,13 +198,13 @@ new file mode 100644
+gdb_breakpoint [gdb_get_line_number "var_char-filled-1"]
+gdb_continue_to_breakpoint "var_char-filled-1"
+gdb_test "print var_char" \
-+ " = \\(PTR TO -> \\( character\\*3\\)\\) ${hex}" \
++ " = \\(PTR TO -> \\( character\\*3 \\)\\) ${hex}" \
+ "print var_char after filled first time"
+gdb_test "print *var_char" " = 'foo'" \
+ "print *var_char after filled first time"
-+gdb_test "whatis var_char" "type = PTR TO -> \\( character\\*3\\)" \
++gdb_test "whatis var_char" "type = PTR TO -> \\( character\\*3 \\)" \
+ "whatis var_char after filled first time"
-+gdb_test "ptype var_char" "type = PTR TO -> \\( character\\*3\\)" \
++gdb_test "ptype var_char" "type = PTR TO -> \\( character\\*3 \\)" \
+ "ptype var_char after filled first time"
+gdb_test "print var_char(1)" " = 102 'f'" "print var_char(1)"
+gdb_test "print var_char(3)" " = 111 'o'" "print var_char(3)"
@@ -244,46 +212,46 @@ new file mode 100644
+gdb_breakpoint [gdb_get_line_number "var_char-filled-2"]
+gdb_continue_to_breakpoint "var_char-filled-2"
+gdb_test "print var_char" \
-+ " = \\(PTR TO -> \\( character\\*6\\)\\) ${hex}" \
++ " = \\(PTR TO -> \\( character\\*6 \\)\\) ${hex}" \
+ "print var_char after allocated second time"
+gdb_test "print *var_char" " = 'foobar'" \
+ "print *var_char after allocated second time"
-+gdb_test "whatis var_char" "type = PTR TO -> \\( character\\*6\\)" \
++gdb_test "whatis var_char" "type = PTR TO -> \\( character\\*6 \\)" \
+ "whatis var_char second time"
-+gdb_test "ptype var_char" "type = PTR TO -> \\( character\\*6\\)" \
++gdb_test "ptype var_char" "type = PTR TO -> \\( character\\*6 \\)" \
+ "ptype var_char second time"
+
+gdb_breakpoint [gdb_get_line_number "var_char-empty"]
+gdb_continue_to_breakpoint "var_char-empty"
+gdb_test "print var_char" \
-+ " = \\(PTR TO -> \\( character\\*0\\)\\) ${hex}" \
++ " = \\(PTR TO -> \\( character\\*0 \\)\\) ${hex}" \
+ "print var_char after set empty"
+gdb_test "print *var_char" " = \"\"" "print *var_char after set empty"
-+gdb_test "whatis var_char" "type = PTR TO -> \\( character\\*0\\)" \
++gdb_test "whatis var_char" "type = PTR TO -> \\( character\\*0 \\)" \
+ "whatis var_char after set empty"
-+gdb_test "ptype var_char" "type = PTR TO -> \\( character\\*0\\)" \
++gdb_test "ptype var_char" "type = PTR TO -> \\( character\\*0 \\)" \
+ "ptype var_char after set empty"
+
+gdb_breakpoint [gdb_get_line_number "var_char-allocated-3"]
+gdb_continue_to_breakpoint "var_char-allocated-3"
+gdb_test "print var_char" \
-+ " = \\(PTR TO -> \\( character\\*21\\)\\) ${hex}" \
++ " = \\(PTR TO -> \\( character\\*21 \\)\\) ${hex}" \
+ "print var_char after allocated third time"
-+gdb_test "whatis var_char" "type = PTR TO -> \\( character\\*21\\)" \
++gdb_test "whatis var_char" "type = PTR TO -> \\( character\\*21 \\)" \
+ "whatis var_char after allocated third time"
-+gdb_test "ptype var_char" "type = PTR TO -> \\( character\\*21\\)" \
++gdb_test "ptype var_char" "type = PTR TO -> \\( character\\*21 \\)" \
+ "ptype var_char after allocated third time"
+
+gdb_breakpoint [gdb_get_line_number "var_char_p-associated"]
+gdb_continue_to_breakpoint "var_char_p-associated"
+gdb_test "print var_char_p" \
-+ " = \\(PTR TO -> \\( character\\*7\\)\\) ${hex}" \
++ " = \\(PTR TO -> \\( character\\*7 \\)\\) ${hex}" \
+ "print var_char_p after associated"
+gdb_test "print *var_char_p" " = 'johndoe'" \
+ "print *var_char_ after associated"
-+gdb_test "whatis var_char_p" "type = PTR TO -> \\( character\\*7\\)" \
++gdb_test "whatis var_char_p" "type = PTR TO -> \\( character\\*7 \\)" \
+ "whatis var_char_p after associated"
-+gdb_test "ptype var_char_p" "type = PTR TO -> \\( character\\*7\\)" \
++gdb_test "ptype var_char_p" "type = PTR TO -> \\( character\\*7 \\)" \
+ "ptype var_char_p after associated"
diff --git a/gdb/testsuite/gdb.fortran/vla-stringsold.f90 b/gdb/testsuite/gdb.fortran/vla-stringsold.f90
new file mode 100644
@@ -330,21 +298,3 @@ new file mode 100644
+ var_char_p => null()
+ l = associated(var_char_p) ! var_char_p-not-associated
+end program vla_strings
-diff --git a/gdb/testsuite/gdb.fortran/whatis_type.exp b/gdb/testsuite/gdb.fortran/whatis_type.exp
---- a/gdb/testsuite/gdb.fortran/whatis_type.exp
-+++ b/gdb/testsuite/gdb.fortran/whatis_type.exp
-@@ -44,7 +44,7 @@ gdb_test "whatis t2" "type = Type t2"
- gdb_test "whatis t2v" "type = Type t2"
- gdb_test "whatis t3" "type = Type t3"
- gdb_test "whatis t3v" "type = Type t3"
--gdb_test "whatis t3p" "type = PTR TO -> \\( Type t3 \\)"
-+gdb_test "whatis t3p" "type = PTR TO -> \\( Type t3\\)"
-
- gdb_test "ptype t1" \
- [multi_line "type = Type t1" \
-@@ -73,4 +73,4 @@ gdb_test "ptype t3p" \
- [multi_line "type = PTR TO -> \\( Type t3" \
- " $int :: t3_i" \
- " Type t2 :: t2_n" \
-- "End Type t3 \\)"]
-+ "End Type t3\\)"]
diff --git a/gdb.spec b/gdb.spec
index 9cfd33b..95eeca6 100644
--- a/gdb.spec
+++ b/gdb.spec
@@ -37,7 +37,7 @@ Version: 10.1
# The release always contains a leading reserved number, start it at 1.
# `upstream' is not a part of `name' to stay fully rpm dependencies compatible for the testing.
-Release: 10%{?dist}
+Release: 11%{?dist}
License: GPLv3+ and GPLv3+ with exceptions and GPLv2+ and GPLv2+ with exceptions and GPL+ and LGPLv2+ and LGPLv3+ and BSD and Public Domain and GFDL
# Do not provide URL for snapshots as the file lasts there only for 2 days.
@@ -1195,6 +1195,10 @@ fi
%endif
%changelog
+* Thu Mar 4 2021 Jan Kratochvil <jan.kratochvil@redhat.com> - 10.1-11
+- Align gdb-vla-intel-fortran-vla-strings.patch more to upstream
+ fixing whitespaces in Fortran types printing.
+
* Thu Mar 4 2021 Jan Kratochvil <jan.kratochvil@redhat.com> - 10.1-10
- Reapply 10.1-8 after it has been accidentally reverted by 10.1-9.
reply other threads:[~2026-06-28 0:00 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=178260481206.1.8904571714554969745.rpms-gdb-de24db0eb7f1@fedoraproject.org \
--to=jan.kratochvil@redhat.com \
--cc=git-commits@fedoraproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox