This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA] enable/disable sub breakpoint range
- From: Joel Brobecker <brobecker at adacore dot com>
- To: Xavier Roirand <roirand at adacore dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Thu, 17 Aug 2017 17:38:19 -0400
- Subject: Re: [RFA] enable/disable sub breakpoint range
- Authentication-results: sourceware.org; auth=none
- References: <aa6ee4a4-fc17-55c4-c211-6c0c724971f8@adacore.com>
> This patch add capability to enable/disable sub breakpoints using range
> notation.
[...]
> gdb/ChangeLog:
>
> * breakpoint.c (enable_disable_bp_with_num): create from
> enable/disable command refactoring.
> (enable_disable_sub_bp_range): create for handling sub
> breakpoint range parsing.
> (disable_command): refactor using enable_disable_bp_with_num
> now.
> (enable_command): refactor using enable_disable_bp_with_num now.
>
> gdb/doc/ChangeLog:
>
> * gdb.texinfo (Set Breaks): add documentation for sub breakpoint
> range enable/disable action.
For the record, Xavier also submitted this patch internally, and
I provided some comments which I think Xavier will try to address
with a second version of the patch.
In particular, one of my comments is that it seems that we are going
back and forth between strings and numbers just because some of
the function we re-use here take a string as a paraeeter when
conceptually the parameter should be a number. I think we can avoid
that unnecessary back-and-forth by splitting the string parsing from
the actual handling of those numbers.
One minor comment is that I think we should avoid modifying the input
string.
--
Joel