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 v3] enable/disable sub breakpoint range


On 10/03/2017 06:00 PM, Eli Zaretskii wrote:
>> Cc: roirand@adacore.com, gdb-patches@sourceware.org
>> From: Pedro Alves <palves@redhat.com>
>> Date: Tue, 3 Oct 2017 17:40:45 +0100
>>
>>  (gdb) delete 1.3-5 4-5
>>
>> I don't understand why you say you have to give them up.
> 
> Because I now need to break a single range into several ranges.
> 
> Wouldn't it be better to use 1.3-1.5 for the subranges, and then we
> could still say 1.3-5 to mean all the breakpoints between 1.3 and 5?

IMO, I'd rather not treat treat locations as decimals.
If we supported that, then we'd naturally want to support 1.3-4.5 as 
well as meaning all locations from 1.3 to 4.5.  I don't think
that that's going to be a normal use case at all.  Usually you'll
set a breakpoint, and then look at the list of created locations
and disable a few, all for the same breakpoint.

Also, I think it'd be very confusing if we broke from how
we treat sub ranges in other commands (such as thread ids).

And also, if we ever come up with some object as is more than
2 levels deep, like e.g., A.B.C, then I think range specifiers like 
A.B.C1-C2 is much more friendly to type (and easier to implement)
than A.B.C1-A.B.C2.

Thanks,
Pedro Alves


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