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: Status of 'blacklist' patch?


Ah, I missed that "!".  Thanks!

On Tue, Oct 25, 2011 at 4:36 PM, Pedro Alves <pedro@codesourcery.com> wrote:
> On Tuesday 25 October 2011 20:51:31, Justin Lebar wrote:
>> > Justin> + Âif (arg != 0)
>> > Justin> + Â Â{
>> > Justin> + Â Â Âentry_num = parse_and_eval_long (arg);
>> > Justin> + Â Â}
>> >
>> > This will parse and evaluate an expression. ÂI think something like what
>> > "info break" does would be more in keeping with other places in gdb --
>> > that is, use get_number_or_range, then iterate.
>>
>> breakpoint_1 calls parse_and_eval_long:
>>
>> Â Â Â Â Â if (allflag && parse_and_eval_long (args) != b->number)
>> Â Â Â Â Â Â continue;
>> Â Â Â Â Â if (!allflag && !number_is_in_list (args, b->number))
>> Â Â Â Â Â Â continue;
>>
>> Do we want to copy the breakpoint code here, or not?
>
> Yes. :-) ÂALLFLAG being true means breakpoint_1 is being called
> to implement the "maint info breakpoints" command, which needs to
> handle negative breakpoint numbers, which are not visible to the
> regular "info breakpoints" command. ÂThat uses parse_and_eval_long
> because ranges can't handle negative numbers. ÂWhen ALLFLAG is false,
> that code is implementing the "info breakpoints" command, and that
> you'll notice the number_is_in_list call, which is a wrapper around
> get_number_or_range. ÂIf you make your code use number_is_in_list,
> you'll get e.g., "info skip 1-10 12 30" support for free.
>
> --
> Pedro Alves
>


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