From: Philippe Waroquiers <philippe.waroquiers@skynet.be>
To: Joel Brobecker <brobecker@adacore.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [RFA] Fix some gdb.ada tests failures due to naming conflict.
Date: Wed, 26 Dec 2018 14:11:00 -0000 [thread overview]
Message-ID: <1545833503.31031.10.camel@skynet.be> (raw)
In-Reply-To: <20181226045630.GB21851@adacore.com>
Hello Joel,
Thanks for the review comments.
I just submitted an RFAv2 that should handle all below comments.
On Wed, 2018-12-26 at 08:56 +0400, Joel Brobecker wrote:
> > Fix these by using names that have more chances to be unique.
>
> Thanks for doing that, Philippe. I believe this is because you are
> using a version of the compiler where the entire runtime has debugging
> information, which is not AdaCore's normal mode.
>
> Would you mind terribly splitting this commit into a series of coomits,
> with one commit per tescase? If you are unsure how to do that with git,
> take a look at git reset (and prob. google as well ;-)).
RFAv2 has now one commit per testcase.
>
> >
> > packed_array_assign.exp
> > So, update to test the new (more unique) names in the source order.
>
> We have to te be careful about the component order. AdaCore implemented
> a change last year where components can be automatically re-ordered
> if it makes the code more efficient. One way we can handle this is by
> accepting both orders. However, looking at the record, and the purpuse
> of the testcase, I think we achieve the same goals by just reordering
> the fields in Packed_Rec. That way, the component order chosen by
> the compiler remains the same regardless of the compiler.
Effectively, gcc 6.3.0 and a recent gnat pro behaved differently.
I have updated the test so that both compilers are giving the same
component order.
>
> > rename_subscript_param.exp
> > Fix by renaming 'b' to 'rename_subscript_param_b.
...
> This renaming is unnecessary. What is probably happening as you guessed
> is that the compiler failed to generate the renaming. As a result,
> GDB failed to find "B" in the current scope. That's when it started
> searching in the static then global scope. The wider search does not
> happen if some symbols were found in the current scope, so the
> ambiguity you are seeing is only because of the inability to find "B".
>
> You can still rename "B" if you would like, but the only advantage
> I can see for doing that is that you get the second error message
> (no definition of...) instead of the multiple choice menu in
> situations like yours where the compiler failed to generate
> the necessary debug info.
I have kept the renaming, as this ensures the test fails directly
rather than with a timeout.
>
> > 2018-12-24 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.
>
> It is already written up, and it is fine as is, so no need to
> waste more time on more Changelog writing; but for the future,
> you can saveyourself a bit of time by saying...
>
> * gdb.ada/assign_arr/target_wrapper.ads (Input): Rename to
> Assign_Arr_Input. All users updated.
>
> ... and that's it!
Any hint making writing ChangeLog less frustrating is good to know :).
Thanks
Philippe
prev parent reply other threads:[~2018-12-26 14:11 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-24 14:15 Philippe Waroquiers
2018-12-24 20:58 ` Tom Tromey
2018-12-26 14:13 ` Philippe Waroquiers
2018-12-26 14:20 ` Philippe Waroquiers
2018-12-26 4:56 ` Joel Brobecker
2018-12-26 14:11 ` Philippe Waroquiers [this message]
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=1545833503.31031.10.camel@skynet.be \
--to=philippe.waroquiers@skynet.be \
--cc=brobecker@adacore.com \
--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