This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFA] Fix some gdb.ada tests failures due to naming conflict.


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]