public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [RFC/RFA] enable break
@ 2010-06-19  1:12 Michael Snyder
  2010-06-20  6:34 ` Hui Zhu
  2010-06-20 18:16 ` Tom Tromey
  0 siblings, 2 replies; 4+ messages in thread
From: Michael Snyder @ 2010-06-19  1:12 UTC (permalink / raw)
  To: gdb-patches

[-- Attachment #1: Type: text/plain, Size: 605 bytes --]

I happened to notice that if you say "help disable", you get a list
of sub-commands that includes "disable breakpoints", but if you say
"help enable", the list of sub-commands, does NOT include "enable
breakpoints".  It also doesn't tab-complete on "enable br<tab>".

On investigation, I discovered that the "enable breakpoints" command
is instantiated using "add_abbrev_prefix_cmd".  What the heck -- it's
not an abbreviation.  This dates back to before the current cvs repo.

Changing that call to "add_prefix_cmd" fixes the issues, and causes
no regressions when tested on amd64-linux.

OK to commit?


[-- Attachment #2: prefix.txt --]
[-- Type: text/plain, Size: 887 bytes --]

2010-06-18  Michael Snyder  <msnyder@vmware.com>

	* breakpoint.c (_initialize_breakpoint): Use add_prefix_cmd, 
	not add_abbrev_prefix_cmd, for "enable breakpoints".

Index: breakpoint.c
===================================================================
RCS file: /cvs/src/src/gdb/breakpoint.c,v
retrieving revision 1.490
diff -u -p -r1.490 breakpoint.c
--- breakpoint.c	16 Jun 2010 18:30:30 -0000	1.490
+++ breakpoint.c	19 Jun 2010 01:03:40 -0000
@@ -11264,7 +11264,7 @@ With a subcommand you can enable tempora
 
   add_com_alias ("en", "enable", class_breakpoint, 1);
 
-  add_abbrev_prefix_cmd ("breakpoints", class_breakpoint, enable_command, _("\
+  add_prefix_cmd ("breakpoints", class_breakpoint, enable_command, _("\
 Enable some breakpoints.\n\
 Give breakpoint numbers (separated by spaces) as arguments.\n\
 This is used to cancel the effect of the \"disable\" command.\n\

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [RFC/RFA] enable break
  2010-06-19  1:12 [RFC/RFA] enable break Michael Snyder
@ 2010-06-20  6:34 ` Hui Zhu
  2010-06-20 18:16 ` Tom Tromey
  1 sibling, 0 replies; 4+ messages in thread
From: Hui Zhu @ 2010-06-20  6:34 UTC (permalink / raw)
  To: Michael Snyder; +Cc: gdb-patches

It's test OK on i386-linux.

Thanks,
Hui

On Sat, Jun 19, 2010 at 09:12, Michael Snyder <msnyder@vmware.com> wrote:
> I happened to notice that if you say "help disable", you get a list
> of sub-commands that includes "disable breakpoints", but if you say
> "help enable", the list of sub-commands, does NOT include "enable
> breakpoints".  It also doesn't tab-complete on "enable br<tab>".
>
> On investigation, I discovered that the "enable breakpoints" command
> is instantiated using "add_abbrev_prefix_cmd".  What the heck -- it's
> not an abbreviation.  This dates back to before the current cvs repo.
>
> Changing that call to "add_prefix_cmd" fixes the issues, and causes
> no regressions when tested on amd64-linux.
>
> OK to commit?
>
>
> 2010-06-18  Michael Snyder  <msnyder@vmware.com>
>
>        * breakpoint.c (_initialize_breakpoint): Use add_prefix_cmd,
>        not add_abbrev_prefix_cmd, for "enable breakpoints".
>
> Index: breakpoint.c
> ===================================================================
> RCS file: /cvs/src/src/gdb/breakpoint.c,v
> retrieving revision 1.490
> diff -u -p -r1.490 breakpoint.c
> --- breakpoint.c        16 Jun 2010 18:30:30 -0000      1.490
> +++ breakpoint.c        19 Jun 2010 01:03:40 -0000
> @@ -11264,7 +11264,7 @@ With a subcommand you can enable tempora
>
>   add_com_alias ("en", "enable", class_breakpoint, 1);
>
> -  add_abbrev_prefix_cmd ("breakpoints", class_breakpoint, enable_command,
> _("\
> +  add_prefix_cmd ("breakpoints", class_breakpoint, enable_command, _("\
>  Enable some breakpoints.\n\
>  Give breakpoint numbers (separated by spaces) as arguments.\n\
>  This is used to cancel the effect of the \"disable\" command.\n\
>
>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [RFC/RFA] enable break
  2010-06-19  1:12 [RFC/RFA] enable break Michael Snyder
  2010-06-20  6:34 ` Hui Zhu
@ 2010-06-20 18:16 ` Tom Tromey
  2010-06-21 17:39   ` Michael Snyder
  1 sibling, 1 reply; 4+ messages in thread
From: Tom Tromey @ 2010-06-20 18:16 UTC (permalink / raw)
  To: Michael Snyder; +Cc: gdb-patches

>>>>> "Michael" == Michael Snyder <msnyder@vmware.com> writes:

Michael> 2010-06-18  Michael Snyder  <msnyder@vmware.com>
Michael> 	* breakpoint.c (_initialize_breakpoint): Use add_prefix_cmd, 
Michael> 	not add_abbrev_prefix_cmd, for "enable breakpoints".

This is ok, thanks.

Tom

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [RFC/RFA] enable break
  2010-06-20 18:16 ` Tom Tromey
@ 2010-06-21 17:39   ` Michael Snyder
  0 siblings, 0 replies; 4+ messages in thread
From: Michael Snyder @ 2010-06-21 17:39 UTC (permalink / raw)
  To: gdb-patches

Tom Tromey wrote:
>>>>>> "Michael" == Michael Snyder <msnyder@vmware.com> writes:
> 
> Michael> 2010-06-18  Michael Snyder  <msnyder@vmware.com>
> Michael> 	* breakpoint.c (_initialize_breakpoint): Use add_prefix_cmd, 
> Michael> 	not add_abbrev_prefix_cmd, for "enable breakpoints".
> 
> This is ok, thanks.

Committed.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-06-21 17:39 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-06-19  1:12 [RFC/RFA] enable break Michael Snyder
2010-06-20  6:34 ` Hui Zhu
2010-06-20 18:16 ` Tom Tromey
2010-06-21 17:39   ` Michael Snyder

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).