Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Philippe Waroquiers <philippe.waroquiers@skynet.be>
To: gdb-patches@sourceware.org
Cc: Philippe Waroquiers <philippe.waroquiers@skynet.be>
Subject: [RFAv2 2/4] Fix gdb.ada/rename_subscript_param.exp by using more unique names.
Date: Wed, 26 Dec 2018 14:03:00 -0000	[thread overview]
Message-ID: <20181226140304.19594-3-philippe.waroquiers@skynet.be> (raw)
In-Reply-To: <20181226140304.19594-1-philippe.waroquiers@skynet.be>

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


  parent reply	other threads:[~2018-12-26 14:03 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-26 14:03 [RFAv2 0/4] Fix some gdb.ada tests failure " Philippe Waroquiers
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 ` Philippe Waroquiers [this message]
2018-12-26 15:27   ` [RFAv2 2/4] Fix gdb.ada/rename_subscript_param.exp " Joel Brobecker
2018-12-26 15:50     ` Philippe Waroquiers
2018-12-27  2:36       ` 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
2018-12-26 14:03 ` [RFAv2 1/4] Fix gdb.ada/packed_array_assign.exp " Philippe Waroquiers
2018-12-26 15:20   ` Joel Brobecker

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=20181226140304.19594-3-philippe.waroquiers@skynet.be \
    --to=philippe.waroquiers@skynet.be \
    --cc=gdb-patches@sourceware.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