Don't repeat breakpoint commands
Commit Message
There's no real use case for repeatedly adding the same breakpoint.
gdb/ChangeLog:
* breakpoint.c (break_command_1): Add dont_repeat call.
---
gdb/breakpoint.c | 2 ++
1 file changed, 2 insertions(+)
Comments
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
@@ -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;