* [RFAv2 2/4] Fix gdb.ada/rename_subscript_param.exp by using more unique names.
2018-12-26 14:03 [RFAv2 0/4] Fix some gdb.ada tests failure by using more unique names Philippe Waroquiers
@ 2018-12-26 14:03 ` Philippe Waroquiers
2018-12-26 15:27 ` Joel Brobecker
2018-12-26 14:03 ` [RFAv2 4/4] Fix gdb.ada/fun_renaming.exp " Philippe Waroquiers
` (2 subsequent siblings)
3 siblings, 1 reply; 12+ messages in thread
From: Philippe Waroquiers @ 2018-12-26 14:03 UTC (permalink / raw)
To: gdb-patches; +Cc: Philippe Waroquiers
The test fails due to conflict between boolean 'b'and some 'b' in atnat.h:
(gdb) print b
Multiple matches for b
[0] cancel
[1] b at ../sysdeps/ieee754/dbl-64/atnat.h:106
[2] b at ../sysdeps/ieee754/dbl-64/atnat.h:106
[3] b at ../sysdeps/ieee754/dbl-64/atnat.h:106
> FAIL: gdb.ada/rename_subscript_param.exp: print b before changing its value (timeout)
Fix by renaming 'b' to 'rename_subscript_param_b.
Also, change 'before' to 'after' in the gdb_test message that prints
the value after changing it.
The test however still fails for me, probably because the Debian stable
Ada compiler is too old, and does not properly generate debug info for
this renamining:
(gdb) print rename_subscript_param_b
No definition of "rename_subscript_param_b" in current context.
(gdb) FAIL: gdb.ada/rename_subscript_param.exp: print rename_subscript_param_b before changing its value
Note: if the compiler would generate the correct debug info, the test should
succeed with the name B. However, waiting for this fix, changing the name
ensures that the test fails directly, instead of causing a timeout.
2018-12-26 Philippe Waroquiers <philippe.waroquiers@skynet.be>
* gdb.ada/rename_subscript_param/pkg.adb (B): Rename to
Rename_Subscript_Param_B. All users updated.
---
gdb/testsuite/gdb.ada/rename_subscript_param.exp | 8 ++++----
gdb/testsuite/gdb.ada/rename_subscript_param/pkg.adb | 4 ++--
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/gdb/testsuite/gdb.ada/rename_subscript_param.exp b/gdb/testsuite/gdb.ada/rename_subscript_param.exp
index 9188bf0fa5..79370cfca2 100644
--- a/gdb/testsuite/gdb.ada/rename_subscript_param.exp
+++ b/gdb/testsuite/gdb.ada/rename_subscript_param.exp
@@ -26,9 +26,9 @@ clean_restart ${testfile}
set bp_location [gdb_get_line_number "BREAK" ${testdir}/pkg.adb]
runto "pkg.adb:$bp_location"
-gdb_test "print b" \
+gdb_test "print rename_subscript_param_b" \
" = false" \
- "print b before changing its value"
+ "print rename_subscript_param_b before changing its value"
set bp_location [gdb_get_line_number "Do_Nothing" ${testdir}/pkg.adb]
gdb_test "break pkg.adb:$bp_location" \
@@ -39,6 +39,6 @@ gdb_test "cont" \
"Breakpoint \[0-9\]+, pkg.flip \\(.*" \
"Continuing to breakpoint on call to Do_Nothing"
-gdb_test "print b" \
+gdb_test "print rename_subscript_param_b" \
" = true" \
- "print b before changing its value"
+ "print rename_subscript_param_b after changing its value"
diff --git a/gdb/testsuite/gdb.ada/rename_subscript_param/pkg.adb b/gdb/testsuite/gdb.ada/rename_subscript_param/pkg.adb
index cdbcd36ea5..c03fe16ad8 100644
--- a/gdb/testsuite/gdb.ada/rename_subscript_param/pkg.adb
+++ b/gdb/testsuite/gdb.ada/rename_subscript_param/pkg.adb
@@ -21,9 +21,9 @@ package body Pkg is
-- Create a new scope to check that the scope match algorithm is fine in
-- the front-end.
declare
- B : Boolean renames Bits (I);
+ Rename_Subscript_Param_B : Boolean renames Bits (I);
begin
- B := not B; -- BREAK
+ Rename_Subscript_Param_B := not Rename_Subscript_Param_B; -- BREAK
Do_Nothing (Bits'Address);
end;
end Flip;
--
2.19.2
^ permalink raw reply [flat|nested] 12+ messages in thread
* [RFAv2 1/4] Fix gdb.ada/packed_array_assign.exp by using more unique names.
2018-12-26 14:03 [RFAv2 0/4] Fix some gdb.ada tests failure by using more unique names Philippe Waroquiers
2018-12-26 14:03 ` [RFAv2 2/4] Fix gdb.ada/rename_subscript_param.exp " Philippe Waroquiers
2018-12-26 14:03 ` [RFAv2 4/4] Fix gdb.ada/fun_renaming.exp " Philippe Waroquiers
@ 2018-12-26 14:03 ` Philippe Waroquiers
2018-12-26 15:20 ` Joel Brobecker
2018-12-26 14:03 ` [RFAv2 3/4] Fix gdb.ada/assign_arr.exp " Philippe Waroquiers
3 siblings, 1 reply; 12+ messages in thread
From: Philippe Waroquiers @ 2018-12-26 14:03 UTC (permalink / raw)
To: gdb-patches; +Cc: Philippe Waroquiers
The test gdb.ada/packed_array_assign fails due to conflict between component 'w'
and system.dim.mks.w:
(gdb) print pra := ((x => 2, y => 0, w => 17), pr, (x => 7, y => 1, w => 23))
Unknown component name: system.dim.mks.w.
(gdb) FAIL: gdb.ada/packed_array_assign.exp: print pra := ((x => 2, y => 0, w => 17), pr, (x => 7, y => 1, w => 23))
Also, depending on the compiler version, the component w might be reordered
and placed before components x and y.
So, change the component order in the source, so that both an old
compiler (GNATMAKE 6.3.0, gcc (Debian 6.3.0-18+deb9u1) 6.3.0 20170516)
and a new compiler (GNATMAKE Pro 20.0w (20181210-82), based on gcc 8.2.1)
produce the same component order (checked by using -gnatR3s).
So, update to test the new (more unique) names in the source order.
2018-12-26 Philippe Waroquiers <philippe.waroquiers@skynet.be>
* gdb.ada/packed_array_assign/aggregates.ads (Packed_Rec):
Rename components to Packed_Array_Assign_[X|Y|W]. Place
component Packed_Array_Assign_W as first component, to ensure
old and new compilers have the same representation.
All users updated.
---
gdb/testsuite/gdb.ada/packed_array_assign.exp | 4 ++--
gdb/testsuite/gdb.ada/packed_array_assign/aggregates.ads | 8 +++++---
2 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/gdb/testsuite/gdb.ada/packed_array_assign.exp b/gdb/testsuite/gdb.ada/packed_array_assign.exp
index 25b20dd223..317a156c8d 100644
--- a/gdb/testsuite/gdb.ada/packed_array_assign.exp
+++ b/gdb/testsuite/gdb.ada/packed_array_assign.exp
@@ -26,5 +26,5 @@ clean_restart ${testfile}
runto "aggregates.run_test"
gdb_test \
- "print pra := ((x => 2, y => 0, w => 17), pr, (x => 7, y => 1, w => 23))" \
- " = \\(\\(w => 17, x => 2, y => 0\\), \\(w => 104, x => 2, y => 3\\), \\(w => 23, x => 7, y => 1\\)\\)"
+ "print pra := ((packed_array_assign_x => 2, packed_array_assign_y => 0, packed_array_assign_w => 17), pr, (packed_array_assign_x => 7, packed_array_assign_y => 1, packed_array_assign_w => 23))" \
+ " = \\(\\(packed_array_assign_w => 17, packed_array_assign_x => 2, packed_array_assign_y => 0\\), \\(packed_array_assign_w => 104, packed_array_assign_x => 2, packed_array_assign_y => 3\\), \\(packed_array_assign_w => 23, packed_array_assign_x => 7, packed_array_assign_y => 1\\)\\)"
diff --git a/gdb/testsuite/gdb.ada/packed_array_assign/aggregates.ads b/gdb/testsuite/gdb.ada/packed_array_assign/aggregates.ads
index b43f70ade7..2648982e0e 100644
--- a/gdb/testsuite/gdb.ada/packed_array_assign/aggregates.ads
+++ b/gdb/testsuite/gdb.ada/packed_array_assign/aggregates.ads
@@ -17,8 +17,8 @@ package Aggregates is
subtype Int is Integer range 0 .. 7;
type Packed_Rec is record
- X, Y : Int;
- W : Integer;
+ Packed_Array_Assign_W : Integer;
+ Packed_Array_Assign_X, Packed_Array_Assign_Y : Int;
end record;
pragma Pack (Packed_Rec);
@@ -28,6 +28,8 @@ package Aggregates is
procedure Run_Test;
private
- PR : Packed_Rec := (y => 3, w => 104, x => 2);
+ PR : Packed_Rec := (Packed_Array_Assign_Y => 3,
+ Packed_Array_Assign_W => 104,
+ Packed_Array_Assign_X => 2);
PRA : Packed_RecArr (1 .. 3);
end Aggregates;
--
2.19.2
^ permalink raw reply [flat|nested] 12+ messages in thread
* [RFAv2 3/4] Fix gdb.ada/assign_arr.exp by using more unique names.
2018-12-26 14:03 [RFAv2 0/4] Fix some gdb.ada tests failure by using more unique names Philippe Waroquiers
` (2 preceding siblings ...)
2018-12-26 14:03 ` [RFAv2 1/4] Fix gdb.ada/packed_array_assign.exp " Philippe Waroquiers
@ 2018-12-26 14:03 ` Philippe Waroquiers
2018-12-26 15:29 ` Joel Brobecker
3 siblings, 1 reply; 12+ messages in thread
From: Philippe Waroquiers @ 2018-12-26 14:03 UTC (permalink / raw)
To: gdb-patches; +Cc: Philippe Waroquiers
The test fails (timeout) due to conflict between var 'input' and s-ststop.adb 'input':
(gdb) print input.u2 := (0.25,0.5,0.75)
Multiple matches for input
[0] cancel
[1] system.strings.stream_ops.storage_array_ops.input (access ada.streams.root_stream_type; system.strings.stream_ops.io_kind; natural) return system.storage_elements.storage_array at s-ststop.adb:127
[2] system.strings.stream_ops.stream_element_array_ops.input (access ada.streams.root_stream_type; system.strings.stream_ops.io_kind; natural) return ada.streams.stream_element_array at s-ststop.adb:127
[3] system.strings.stream_ops.string_ops.input (access ada.streams.root_stream_type; system.strings.stream_ops.io_kind; natural) return string at s-ststop.adb:127
[4] system.strings.stream_ops.wide_string_ops.input (access ada.streams.root_stream_type; system.strings.stream_ops.io_kind; natural) return wide_string at s-ststop.adb:127
[5] system.strings.stream_ops.wide_wide_string_ops.input (access ada.streams.root_stream_type; system.strings.stream_ops.io_kind; natural) return wide_wide_string at s-ststop.adb:127
[6] target_wrapper.input at /bd/home/philippe/gdb/git/info_t/gdb/testsuite/gdb.ada/assign_arr/target_wrapper.ads:24
> FAIL: gdb.ada/assign_arr.exp: print input.u2 := (0.25,0.5,0.75) (timeout)
gdb/testsuite/ChangeLog
2018-12-26 Philippe Waroquiers <philippe.waroquiers@skynet.be>
* gdb.ada/assign_arr/target_wrapper.ads (Input): Rename to
Assign_Arr_Input.
main_p324_051.adb: Update accordingly.
gdb.ada/assign_arr.exp: Likewise.
---
gdb/testsuite/gdb.ada/assign_arr.exp | 2 +-
gdb/testsuite/gdb.ada/assign_arr/main_p324_051.adb | 2 +-
gdb/testsuite/gdb.ada/assign_arr/target_wrapper.ads | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/gdb/testsuite/gdb.ada/assign_arr.exp b/gdb/testsuite/gdb.ada/assign_arr.exp
index 26e2dcda8e..3da07ba99c 100644
--- a/gdb/testsuite/gdb.ada/assign_arr.exp
+++ b/gdb/testsuite/gdb.ada/assign_arr.exp
@@ -26,5 +26,5 @@ clean_restart ${testfile}
set bp_location [gdb_get_line_number "STOP" ${testdir}/main_p324_051.adb]
runto "main_p324_051.adb:$bp_location"
-gdb_test "print input.u2 := (0.25,0.5,0.75)" \
+gdb_test "print assign_arr_input.u2 := (0.25,0.5,0.75)" \
" = \\(0\\.25, 0\\.5, 0\\.75\\)"
diff --git a/gdb/testsuite/gdb.ada/assign_arr/main_p324_051.adb b/gdb/testsuite/gdb.ada/assign_arr/main_p324_051.adb
index d102dd3e67..60010ccc09 100644
--- a/gdb/testsuite/gdb.ada/assign_arr/main_p324_051.adb
+++ b/gdb/testsuite/gdb.ada/assign_arr/main_p324_051.adb
@@ -17,5 +17,5 @@ with target_wrapper; use target_wrapper;
procedure Main_P324_051 is
begin
- input.u2 := (0.2,0.3,0.4); -- STOP
+ Assign_Arr_Input.u2 := (0.2,0.3,0.4); -- STOP
end Main_P324_051;
diff --git a/gdb/testsuite/gdb.ada/assign_arr/target_wrapper.ads b/gdb/testsuite/gdb.ada/assign_arr/target_wrapper.ads
index a58c98790f..deb9e747b2 100644
--- a/gdb/testsuite/gdb.ada/assign_arr/target_wrapper.ads
+++ b/gdb/testsuite/gdb.ada/assign_arr/target_wrapper.ads
@@ -21,6 +21,6 @@ package target_wrapper is
u2 : Float_Array_3;
end record;
- input : parameters;
+ Assign_Arr_Input : parameters;
end target_wrapper;
--
2.19.2
^ permalink raw reply [flat|nested] 12+ messages in thread
* [RFAv2 0/4] Fix some gdb.ada tests failure by using more unique names.
@ 2018-12-26 14:03 Philippe Waroquiers
2018-12-26 14:03 ` [RFAv2 2/4] Fix gdb.ada/rename_subscript_param.exp " Philippe Waroquiers
` (3 more replies)
0 siblings, 4 replies; 12+ messages in thread
From: Philippe Waroquiers @ 2018-12-26 14:03 UTC (permalink / raw)
To: gdb-patches
This patch serie fixes some gdb.ada tests failure that appear when
the Ada runtime is compiled with debug info, e.g. like the Debian
gcc Ada compiler.
The changes compared to first version of RFA are:
* Each test is fixed in a different commit.
* The component order in packed_array_assign Packed_Rec is chosen to
ensure old and new compilers produce the same component order.
Ok to push ?
^ permalink raw reply [flat|nested] 12+ messages in thread
* [RFAv2 4/4] Fix gdb.ada/fun_renaming.exp by using more unique names.
2018-12-26 14:03 [RFAv2 0/4] Fix some gdb.ada tests failure by using more unique names Philippe Waroquiers
2018-12-26 14:03 ` [RFAv2 2/4] Fix gdb.ada/rename_subscript_param.exp " Philippe Waroquiers
@ 2018-12-26 14:03 ` Philippe Waroquiers
2018-12-27 2:39 ` Joel Brobecker
2018-12-26 14:03 ` [RFAv2 1/4] Fix gdb.ada/packed_array_assign.exp " Philippe Waroquiers
2018-12-26 14:03 ` [RFAv2 3/4] Fix gdb.ada/assign_arr.exp " Philippe Waroquiers
3 siblings, 1 reply; 12+ messages in thread
From: Philippe Waroquiers @ 2018-12-26 14:03 UTC (permalink / raw)
To: gdb-patches; +Cc: Philippe Waroquiers
The test fails due to conflict between var 'next' and s-pooloc.adb next:
(gdb) print next(1)
Multiple matches for next
[0] cancel
[1] pack.next (integer) return integer at /bd/home/philippe/gdb/git/binutils-gdb/gdb/testsuite/gdb.ada/fun_renaming/pack.adb:19
[2] system.pool_local.next (system.address) return system.pool_local.acc_address at s-pooloc.adb:151
> FAIL: gdb.ada/fun_renaming.exp: print next(1) (timeout)
Fix by making the names and renamings more unique.
gdb/testsuite/ChangeLog
2018-12-26 Philippe Waroquiers <philippe.waroquiers@skynet.be>
* gdb.ada/fun_renaming/pack.ads (Next): Rename to Fun_Rename_Test_Next.
(Renamed_Next): Rename to Renamed_Fun_Rename_Test_Next.
gdb.ada/fun_renaming/pack.adb (Next): Rename to Fun_Rename_Test_Next.
gdb.ada/fun_renaming/fun_renaming.adb (N): Rename to Fun_Rename_Test_N.
gdb.ada/fun_renaming.exp: Update accordingly.
---
gdb/testsuite/gdb.ada/fun_renaming.exp | 14 +++++++-------
.../gdb.ada/fun_renaming/fun_renaming.adb | 7 ++++---
gdb/testsuite/gdb.ada/fun_renaming/pack.adb | 4 ++--
gdb/testsuite/gdb.ada/fun_renaming/pack.ads | 5 +++--
4 files changed, 16 insertions(+), 14 deletions(-)
diff --git a/gdb/testsuite/gdb.ada/fun_renaming.exp b/gdb/testsuite/gdb.ada/fun_renaming.exp
index 4d4116cc13..cbdd0032ea 100644
--- a/gdb/testsuite/gdb.ada/fun_renaming.exp
+++ b/gdb/testsuite/gdb.ada/fun_renaming.exp
@@ -27,18 +27,18 @@ set bp_location [gdb_get_line_number "BREAK" ${testdir}/fun_renaming.adb]
runto "fun_renaming.adb:$bp_location"
# Sanity check: make sure we can call a regular global function.
-gdb_test "print next(1)" " = 2"
+gdb_test "print fun_rename_test_next(1)" " = 2"
# Starting with GCC 6, renamed subprograms are materialized in the debugging
# information: make sure we can call the regular global function using its
# multiple names.
-set test "print n(1)"
+set test "print fun_rename_test_n(1)"
gdb_test_multiple $test $test {
-re " = 2\..*$gdb_prompt $" {
pass $test
}
- -re "No definition of \"n\" in current context\..*$gdb_prompt $" {
+ -re "No definition of \"fun_rename_test_n\" in current context\..*$gdb_prompt $" {
if {[test_compiler_info {gcc-6*}]} {
fail $test
} else {
@@ -47,12 +47,12 @@ gdb_test_multiple $test $test {
}
}
-set test "print renamed_next(1)"
+set test "print renamed_fun_rename_test_next(1)"
gdb_test_multiple $test $test {
-re " = 2\..*$gdb_prompt $" {
pass $test
}
- -re "No definition of \"renamed_next\" in current context\..*$gdb_prompt $" {
+ -re "No definition of \"renamed_fun_rename_test_next\" in current context\..*$gdb_prompt $" {
if {[test_compiler_info {gcc-6*}]} {
fail $test
} else {
@@ -61,12 +61,12 @@ gdb_test_multiple $test $test {
}
}
-set test "print pack.renamed_next(1)"
+set test "print pack.renamed_fun_rename_test_next(1)"
gdb_test_multiple $test $test {
-re " = 2\..*$gdb_prompt $" {
pass $test
}
- -re "No definition of \"pack\.renamed_next\" in current context\..*$gdb_prompt $" {
+ -re "No definition of \"pack\.renamed_fun_rename_test_next\" in current context\..*$gdb_prompt $" {
if {[test_compiler_info {gcc-6*}]} {
fail $test
} else {
diff --git a/gdb/testsuite/gdb.ada/fun_renaming/fun_renaming.adb b/gdb/testsuite/gdb.ada/fun_renaming/fun_renaming.adb
index eae6eeaf73..12cec24a56 100644
--- a/gdb/testsuite/gdb.ada/fun_renaming/fun_renaming.adb
+++ b/gdb/testsuite/gdb.ada/fun_renaming/fun_renaming.adb
@@ -16,8 +16,9 @@
with Pack;
procedure Fun_Renaming is
- function N (I : Integer) return Integer renames Pack.Next;
+ function Fun_Rename_Test_N (I : Integer) return Integer
+ renames Pack.Fun_Rename_Test_Next;
begin
- Pack.Discard (N (1)); -- BREAK
- Pack.Discard (Pack.Renamed_Next (1)); -- BREAK
+ Pack.Discard (Fun_Rename_Test_N (1)); -- BREAK
+ Pack.Discard (Pack.Renamed_Fun_Rename_Test_Next (1)); -- BREAK
end Fun_Renaming;
diff --git a/gdb/testsuite/gdb.ada/fun_renaming/pack.adb b/gdb/testsuite/gdb.ada/fun_renaming/pack.adb
index abbec2a284..5349cdee5a 100644
--- a/gdb/testsuite/gdb.ada/fun_renaming/pack.adb
+++ b/gdb/testsuite/gdb.ada/fun_renaming/pack.adb
@@ -14,10 +14,10 @@
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
package body Pack is
- function Next (I : Integer) return Integer is
+ function Fun_Rename_Test_Next (I : Integer) return Integer is
begin
return I + 1;
- end Next;
+ end Fun_Rename_Test_Next;
procedure Discard (I : Integer) is
begin
diff --git a/gdb/testsuite/gdb.ada/fun_renaming/pack.ads b/gdb/testsuite/gdb.ada/fun_renaming/pack.ads
index be46315440..ba3a999f42 100644
--- a/gdb/testsuite/gdb.ada/fun_renaming/pack.ads
+++ b/gdb/testsuite/gdb.ada/fun_renaming/pack.ads
@@ -15,8 +15,9 @@
package Pack is
- function Next (I : Integer) return Integer;
- function Renamed_Next (I : Integer) return Integer renames Next;
+ function Fun_Rename_Test_Next (I : Integer) return Integer;
+ function Renamed_Fun_Rename_Test_Next (I : Integer) return Integer
+ renames Fun_Rename_Test_Next;
procedure Discard (I : Integer);
end Pack;
--
2.19.2
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [RFAv2 1/4] Fix gdb.ada/packed_array_assign.exp by using more unique names.
2018-12-26 14:03 ` [RFAv2 1/4] Fix gdb.ada/packed_array_assign.exp " Philippe Waroquiers
@ 2018-12-26 15:20 ` Joel Brobecker
0 siblings, 0 replies; 12+ messages in thread
From: Joel Brobecker @ 2018-12-26 15:20 UTC (permalink / raw)
To: Philippe Waroquiers; +Cc: gdb-patches
> The test gdb.ada/packed_array_assign fails due to conflict between component 'w'
> and system.dim.mks.w:
>
> (gdb) print pra := ((x => 2, y => 0, w => 17), pr, (x => 7, y => 1, w => 23))
> Unknown component name: system.dim.mks.w.
> (gdb) FAIL: gdb.ada/packed_array_assign.exp: print pra := ((x => 2, y => 0, w => 17), pr, (x => 7, y => 1, w => 23))
>
> Also, depending on the compiler version, the component w might be reordered
> and placed before components x and y.
> So, change the component order in the source, so that both an old
> compiler (GNATMAKE 6.3.0, gcc (Debian 6.3.0-18+deb9u1) 6.3.0 20170516)
> and a new compiler (GNATMAKE Pro 20.0w (20181210-82), based on gcc 8.2.1)
> produce the same component order (checked by using -gnatR3s).
>
> So, update to test the new (more unique) names in the source order.
>
> 2018-12-26 Philippe Waroquiers <philippe.waroquiers@skynet.be>
>
> * gdb.ada/packed_array_assign/aggregates.ads (Packed_Rec):
> Rename components to Packed_Array_Assign_[X|Y|W]. Place
> component Packed_Array_Assign_W as first component, to ensure
> old and new compilers have the same representation.
> All users updated.
Thank you, Philippe. This is OK!
--
Joel
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [RFAv2 2/4] Fix gdb.ada/rename_subscript_param.exp by using more unique names.
2018-12-26 14:03 ` [RFAv2 2/4] Fix gdb.ada/rename_subscript_param.exp " Philippe Waroquiers
@ 2018-12-26 15:27 ` Joel Brobecker
2018-12-26 15:50 ` Philippe Waroquiers
0 siblings, 1 reply; 12+ messages in thread
From: Joel Brobecker @ 2018-12-26 15:27 UTC (permalink / raw)
To: Philippe Waroquiers; +Cc: gdb-patches
On Wed, Dec 26, 2018 at 03:03:02PM +0100, Philippe Waroquiers wrote:
> The test fails due to conflict between boolean 'b'and some 'b' in atnat.h:
>
> (gdb) print b
> Multiple matches for b
> [0] cancel
> [1] b at ../sysdeps/ieee754/dbl-64/atnat.h:106
> [2] b at ../sysdeps/ieee754/dbl-64/atnat.h:106
> [3] b at ../sysdeps/ieee754/dbl-64/atnat.h:106
> > FAIL: gdb.ada/rename_subscript_param.exp: print b before changing its value (timeout)
>
> Fix by renaming 'b' to 'rename_subscript_param_b.
To me, the way this patch is explained is a little misleading
("the fix"). I would explain instead why you are getting this
multiple-choice question, and why you are electing to rename
the entity...
> Also, change 'before' to 'after' in the gdb_test message that prints
> the value after changing it.
> The test however still fails for me, probably because the Debian stable
> Ada compiler is too old, and does not properly generate debug info for
> this renamining:
> (gdb) print rename_subscript_param_b
> No definition of "rename_subscript_param_b" in current context.
> (gdb) FAIL: gdb.ada/rename_subscript_param.exp: print rename_subscript_param_b before changing its value
>
> Note: if the compiler would generate the correct debug info, the test should
> succeed with the name B. However, waiting for this fix, changing the name
> ensures that the test fails directly, instead of causing a timeout.
>
> 2018-12-26 Philippe Waroquiers <philippe.waroquiers@skynet.be>
>
> * gdb.ada/rename_subscript_param/pkg.adb (B): Rename to
> Rename_Subscript_Param_B. All users updated.
The patch itself looks good, though.
--
Joel
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [RFAv2 3/4] Fix gdb.ada/assign_arr.exp by using more unique names.
2018-12-26 14:03 ` [RFAv2 3/4] Fix gdb.ada/assign_arr.exp " Philippe Waroquiers
@ 2018-12-26 15:29 ` Joel Brobecker
0 siblings, 0 replies; 12+ messages in thread
From: Joel Brobecker @ 2018-12-26 15:29 UTC (permalink / raw)
To: Philippe Waroquiers; +Cc: gdb-patches
> gdb/testsuite/ChangeLog
> 2018-12-26 Philippe Waroquiers <philippe.waroquiers@skynet.be>
>
> * gdb.ada/assign_arr/target_wrapper.ads (Input): Rename to
> Assign_Arr_Input.
> main_p324_051.adb: Update accordingly.
> gdb.ada/assign_arr.exp: Likewise.
Thank you Philippe. This is OK.
--
Joel
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [RFAv2 2/4] Fix gdb.ada/rename_subscript_param.exp by using more unique names.
2018-12-26 15:27 ` Joel Brobecker
@ 2018-12-26 15:50 ` Philippe Waroquiers
2018-12-27 2:36 ` Joel Brobecker
0 siblings, 1 reply; 12+ messages in thread
From: Philippe Waroquiers @ 2018-12-26 15:50 UTC (permalink / raw)
To: Joel Brobecker; +Cc: gdb-patches
On Wed, 2018-12-26 at 19:27 +0400, Joel Brobecker wrote:
> On Wed, Dec 26, 2018 at 03:03:02PM +0100, Philippe Waroquiers wrote:
> > The test fails due to conflict between boolean 'b'and some 'b' in atnat.h:
> >
> > (gdb) print b
> > Multiple matches for b
> > [0] cancel
> > [1] b at ../sysdeps/ieee754/dbl-64/atnat.h:106
> > [2] b at ../sysdeps/ieee754/dbl-64/atnat.h:106
> > [3] b at ../sysdeps/ieee754/dbl-64/atnat.h:106
> > > FAIL: gdb.ada/rename_subscript_param.exp: print b before changing its value (timeout)
> >
> > Fix by renaming 'b' to 'rename_subscript_param_b.
>
> To me, the way this patch is explained is a little misleading
> ("the fix"). I would explain instead why you are getting this
> multiple-choice question, and why you are electing to rename
> the entity...
What about this new commit message ?
--------------------------------------------------
Improve gdb.ada/rename_subscript_param.exp by using more unique names.
With old compilers, the test fails because no debug info is generated
for 'B' and GDB finds some 'b' in atnat.h:
(gdb) print b
Multiple matches for b
[0] cancel
[1] b at ../sysdeps/ieee754/dbl-64/atnat.h:106
[2] b at ../sysdeps/ieee754/dbl-64/atnat.h:106
[3] b at ../sysdeps/ieee754/dbl-64/atnat.h:106
> FAIL: gdb.ada/rename_subscript_param.exp: print b before changing its value (timeout)
Avoid the timeout by renaming 'b' to rename_subscript_param_b.
Also, change 'before' to 'after' in the gdb_test message that prints
the value after changing it.
The test still fails with old compilers that do not properly
generate debug info for this renaming:
(gdb) print rename_subscript_param_b
No definition of "rename_subscript_param_b" in current context.
(gdb) FAIL: gdb.ada/rename_subscript_param.exp: print rename_subscript_param_b before changing its value
Note: if the compiler would generate the correct debug info, the test should
succeed with the name B.  However, waiting for this fix, changing the name
ensures that the test fails directly, instead of causing a timeout.
2018-12-26  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
PR ada/23381
* gdb.ada/rename_subscript_param/pkg.adb (B): Rename to
Rename_Subscript_Param_B.  All users updated.
gdb.ada/rename_subscript_param.exp: Test names made unique.
Note that PR ada/23381 is only fully fixed when using a recent
compiler.
>
> > Also, change 'before' to 'after' in the gdb_test message that prints
> > the value after changing it.
> > The test however still fails for me, probably because the Debian stable
> > Ada compiler is too old, and does not properly generate debug info for
> > this renamining:
> > (gdb) print rename_subscript_param_b
> > No definition of "rename_subscript_param_b" in current context.
> > (gdb) FAIL: gdb.ada/rename_subscript_param.exp: print rename_subscript_param_b before changing its value
> >
> > Note: if the compiler would generate the correct debug info, the test should
> > succeed with the name B. However, waiting for this fix, changing the name
> > ensures that the test fails directly, instead of causing a timeout.
> >
> > 2018-12-26 Philippe Waroquiers <philippe.waroquiers@skynet.be>
> >
> > * gdb.ada/rename_subscript_param/pkg.adb (B): Rename to
> > Rename_Subscript_Param_B. All users updated.
>
> The patch itself looks good, though.
>
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [RFAv2 2/4] Fix gdb.ada/rename_subscript_param.exp by using more unique names.
2018-12-26 15:50 ` Philippe Waroquiers
@ 2018-12-27 2:36 ` Joel Brobecker
0 siblings, 0 replies; 12+ messages in thread
From: Joel Brobecker @ 2018-12-27 2:36 UTC (permalink / raw)
To: Philippe Waroquiers; +Cc: gdb-patches
> What about this new commit message ?
Loks very good. Thanks Philippe!
>
> --------------------------------------------------
> Improve gdb.ada/rename_subscript_param.exp by using more unique names.
>
> With old compilers, the test fails because no debug info is generated
> for 'B' and GDB finds some 'b' in atnat.h:
>
> (gdb) print b
> Multiple matches for b
> [0] cancel
> [1] b at ../sysdeps/ieee754/dbl-64/atnat.h:106
> [2] b at ../sysdeps/ieee754/dbl-64/atnat.h:106
> [3] b at ../sysdeps/ieee754/dbl-64/atnat.h:106
> > FAIL: gdb.ada/rename_subscript_param.exp: print b before changing its value (timeout)
>
> Avoid the timeout by renaming 'b' to rename_subscript_param_b.
>
> Also, change 'before' to 'after' in the gdb_test message that prints
> the value after changing it.
>
> The test still fails with old compilers that do not properly
> generate debug info for this renaming:
> (gdb) print rename_subscript_param_b
> No definition of "rename_subscript_param_b" in current context.
> (gdb) FAIL: gdb.ada/rename_subscript_param.exp: print rename_subscript_param_b before changing its value
>
> Note: if the compiler would generate the correct debug info, the test should
> succeed with the name B.  However, waiting for this fix, changing the name
> ensures that the test fails directly, instead of causing a timeout.
>
> 2018-12-26  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
>
> PR ada/23381
> * gdb.ada/rename_subscript_param/pkg.adb (B): Rename to
> Rename_Subscript_Param_B.  All users updated.
> gdb.ada/rename_subscript_param.exp: Test names made unique.
> Note that PR ada/23381 is only fully fixed when using a recent
> compiler.
>
> >
> > > Also, change 'before' to 'after' in the gdb_test message that prints
> > > the value after changing it.
> > > The test however still fails for me, probably because the Debian stable
> > > Ada compiler is too old, and does not properly generate debug info for
> > > this renamining:
> > > (gdb) print rename_subscript_param_b
> > > No definition of "rename_subscript_param_b" in current context.
> > > (gdb) FAIL: gdb.ada/rename_subscript_param.exp: print rename_subscript_param_b before changing its value
> > >
> > > Note: if the compiler would generate the correct debug info, the test should
> > > succeed with the name B. However, waiting for this fix, changing the name
> > > ensures that the test fails directly, instead of causing a timeout.
> > >
> > > 2018-12-26 Philippe Waroquiers <philippe.waroquiers@skynet.be>
> > >
> > > * gdb.ada/rename_subscript_param/pkg.adb (B): Rename to
> > > Rename_Subscript_Param_B. All users updated.
> >
> > The patch itself looks good, though.
> >
--
Joel
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [RFAv2 4/4] Fix gdb.ada/fun_renaming.exp by using more unique names.
2018-12-26 14:03 ` [RFAv2 4/4] Fix gdb.ada/fun_renaming.exp " Philippe Waroquiers
@ 2018-12-27 2:39 ` Joel Brobecker
2018-12-27 10:07 ` Philippe Waroquiers
0 siblings, 1 reply; 12+ messages in thread
From: Joel Brobecker @ 2018-12-27 2:39 UTC (permalink / raw)
To: Philippe Waroquiers; +Cc: gdb-patches
> gdb/testsuite/ChangeLog
> 2018-12-26 Philippe Waroquiers <philippe.waroquiers@skynet.be>
>
> * gdb.ada/fun_renaming/pack.ads (Next): Rename to Fun_Rename_Test_Next.
> (Renamed_Next): Rename to Renamed_Fun_Rename_Test_Next.
> gdb.ada/fun_renaming/pack.adb (Next): Rename to Fun_Rename_Test_Next.
> gdb.ada/fun_renaming/fun_renaming.adb (N): Rename to Fun_Rename_Test_N.
> gdb.ada/fun_renaming.exp: Update accordingly.
Thank you, Philippe. This is OK as well.
--
Joel
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [RFAv2 4/4] Fix gdb.ada/fun_renaming.exp by using more unique names.
2018-12-27 2:39 ` Joel Brobecker
@ 2018-12-27 10:07 ` Philippe Waroquiers
0 siblings, 0 replies; 12+ messages in thread
From: Philippe Waroquiers @ 2018-12-27 10:07 UTC (permalink / raw)
To: Joel Brobecker; +Cc: gdb-patches
On Thu, 2018-12-27 at 06:38 +0400, Joel Brobecker wrote:
> > gdb/testsuite/ChangeLog
> > 2018-12-26 Philippe Waroquiers <philippe.waroquiers@skynet.be>
> >
> > * gdb.ada/fun_renaming/pack.ads (Next): Rename to Fun_Rename_Test_Next.
> > (Renamed_Next): Rename to Renamed_Fun_Rename_Test_Next.
> > gdb.ada/fun_renaming/pack.adb (Next): Rename to Fun_Rename_Test_Next.
> > gdb.ada/fun_renaming/fun_renaming.adb (N): Rename to Fun_Rename_Test_N.
> > gdb.ada/fun_renaming.exp: Update accordingly.
>
> Thank you, Philippe. This is OK as well.
Thanks for the reviews, I have pushed the 4 patches.
Philippe
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2018-12-27 10:07 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-26 14:03 [RFAv2 0/4] Fix some gdb.ada tests failure by using more unique names Philippe Waroquiers
2018-12-26 14:03 ` [RFAv2 2/4] Fix gdb.ada/rename_subscript_param.exp " Philippe Waroquiers
2018-12-26 15:27 ` Joel Brobecker
2018-12-26 15:50 ` Philippe Waroquiers
2018-12-27 2:36 ` Joel Brobecker
2018-12-26 14:03 ` [RFAv2 4/4] Fix gdb.ada/fun_renaming.exp " Philippe Waroquiers
2018-12-27 2:39 ` Joel Brobecker
2018-12-27 10:07 ` Philippe Waroquiers
2018-12-26 14:03 ` [RFAv2 1/4] Fix gdb.ada/packed_array_assign.exp " Philippe Waroquiers
2018-12-26 15:20 ` Joel Brobecker
2018-12-26 14:03 ` [RFAv2 3/4] Fix gdb.ada/assign_arr.exp " Philippe Waroquiers
2018-12-26 15:29 ` Joel Brobecker
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox