This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Don't repeat breakpoint commands
- From: Joel Brobecker <brobecker at adacore dot com>
- To: Andreas From <andreas dot from at ericsson dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Sat, 6 Dec 2014 07:12:38 +0400
- Subject: Re: [PATCH] Don't repeat breakpoint commands
- Authentication-results: sourceware.org; auth=none
- References: <1417798543-24712-1-git-send-email-andreas dot from at ericsson dot com>
On Fri, Dec 05, 2014 at 11:55:43AM -0500, Andreas From wrote:
> There's no real use case for repeatedly adding the same breakpoint.
>
> gdb/ChangeLog:
>
> * breakpoint.c (break_command_1): Add dont_repeat call.
I would agree, but since this is a slight change of behavior (albeit
a natural one), let's give others another week to comment if they
would like to.
The patch looks good to me; if there are no objections by then,
let's push.
Thank you!
> ---
> gdb/breakpoint.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c
> index 574d06c..f0eede0 100644
> --- a/gdb/breakpoint.c
> +++ b/gdb/breakpoint.c
> @@ -10177,6 +10177,8 @@ break_command_1 (char *arg, int flag, int from_tty)
> struct breakpoint_ops *ops;
> const char *arg_cp = arg;
>
> + dont_repeat ();
> +
> /* Matching breakpoints on probes. */
> if (arg && probe_linespec_to_ops (&arg_cp) != NULL)
> ops = &bkpt_probe_breakpoint_ops;
> --
> 1.9.1
--
Joel