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: [PATCH 2/2] new tracepoint downloaded MI notification.


On 09/29/2012 10:13 PM, Yao Qi wrote:
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}.

On the other hand, if 'adding bp_location number of a breakpoint' can be justified, I'd like to do that, and use bp_location number instead of address here. However, I am not sure whether we need add bp_location number. It is slightly overkill to do so. Any thoughts?


--
Yao


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