[RFAv2 2/4] Fix gdb.ada/rename_subscript_param.exp by using more unique names.

Joel Brobecker brobecker@adacore.com
Wed Dec 26 15:27:00 GMT 2018


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



More information about the Gdb-patches mailing list