Nowadays, location number is generated by incrementing a counter during
iterating a list of bp_location of breakpoint (in
breakpoint.c:print_one_breakpoint), so I am wondering that the
bp_location object may have the different number, if the list of
bp_locations of a breakpoint is removed due to some reasons. Looks
bp_location list of breakpoint is *not* removed except in
breakpoint_program_space_exit, after examine the source code.
For example,
Originally we have a tracepoint of 3 locations,
4 tracepoint keep y <MULTIPLE>
collect $eip^M
4.1 y 0x0804859c in func4 inf 1
4.2 y 0xb7ffc480 in func4 inf 2
4.3 y 0xb7ffc488 in func4 inf 1
due to some reason, bp_location on address 0xb7ffc480 is removed (for
example, inferior 2 is removed), and original bp_location 4.3 becomes 4.2.
In short, if we can make location number persistent (unchanged for a
given bp_location object), then {number, location number} is fine,
otherwise, I'd prefer {number, address}.