[binutils-gdb] breakpoint.c: bp_location (the array) shadows bp_location (the type)

sergiodj+buildbot@sergiodj.net sergiodj+buildbot@sergiodj.net
Thu Apr 13 02:45:00 GMT 2017


*** TEST RESULTS FOR COMMIT f5336ca55ca0aca2507ac8c0f1d573d7f6b877ab ***

Author: Pedro Alves <palves@redhat.com>
Branch: master
Commit: f5336ca55ca0aca2507ac8c0f1d573d7f6b877ab

breakpoint.c: bp_location (the array) shadows bp_location (the type)

The bp_location array has the same name as the "struct bp_location",
type preventing refering to the structure without the "struct" inside
breakpoint.c.  I.e., we must write:

 "new struct bp_location;"

instead of:

 "new bp_location"

Rename the array and the associated variables/functions to avoid the
shadowing.

gdb/ChangeLog:
2017-04-13  Pedro Alves  <palves@redhat.com>

	* breakpoint.c (bp_location): Rename to ...
	(bp_locations): ... this.  All references updated.
	(bp_location_count): Rename to ...
	(bp_locations_count): ... this.  All references updated.
	(bp_location_placed_address_before_address_max): Rename to ...
	(bp_locations_placed_address_before_address_max): ... this.  All
	references updated.
	(bp_location_shadow_len_after_address_max): Rename to ...
	(bp_locations_shadow_len_after_address_max): ... this.  All
	references updated.
	(bp_location_compare_addrs): Rename to ...
	(bp_locations_compare_addrs): ... this.  All references updated.
	(bp_location_compare):Rename to ...
	(bp_locations_compare): ... this.  All references updated.
	(bp_location_target_extensions_update): Rename to ...
	(bp_locations_target_extensions_update): ... this.  All references
	updated.



More information about the Gdb-testers mailing list