* [patch] gdb: add completion handler for "handle"
@ 2012-08-02 3:54 Mike Frysinger
2012-08-02 3:58 ` [patch v2] " Mike Frysinger
2012-08-03 3:51 ` [patch v3] " Mike Frysinger
0 siblings, 2 replies; 11+ messages in thread
From: Mike Frysinger @ 2012-08-02 3:54 UTC (permalink / raw)
To: gdb-patches
The command line completion has spoiled me. Thus the lack of completion with
the "handle" command annoys me. Patch!
This does a few things:
- adds a generic signal completer
- adds a generic completer based on a specified array of strings
- adds a completion handler for the "handle" command
- improves the "signal" and "handle" help strings slightly
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-08-01 Mike Frysinger <vapier@gentoo.org>
* completer.c: Include gdb_signals.h.
(signal_completer): Define.
(string_array_completer): Define.
* completer.h (signal_completer): Add prototype.
(string_array_completer): Likewise.
* infcmd.c (_initialize_infcmd): Add a reference to "handle"
in the "string" documentation.
* infrun.c: Include completer.h.
(handle_completer): Define.
(_initialize_infrun): Declare a new local variable c. Store the
result of add_com("handle") to it. Add simple usage to
the start of the "handle" documentation. Assign the command
completer for "handle" to handle_completer.
gdb/completer.c | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++
gdb/completer.h | 7 +++++++
gdb/infcmd.c | 3 ++-
gdb/infrun.c | 35 +++++++++++++++++++++++++++++++++--
4 files changed, 94 insertions(+), 3 deletions(-)
diff --git a/gdb/completer.c b/gdb/completer.c
index b9f0699..1d81e36 100644
--- a/gdb/completer.c
+++ b/gdb/completer.c
@@ -24,6 +24,7 @@
#include "language.h"
#include "gdb_assert.h"
#include "exceptions.h"
+#include "gdb_signals.h"
#include "cli/cli-decode.h"
@@ -797,6 +798,57 @@ command_completer (struct cmd_list_element *ignore,
strlen (text), handle_help);
}
+/* Complete on signals. */
+
+VEC (char_ptr) *
+signal_completer (struct cmd_list_element *ignore,
+ char *text, char *word)
+{
+ int i;
+ VEC (char_ptr) *return_val = NULL;
+ size_t len = strlen (word);
+ enum gdb_signal signum;
+ const char *signame;
+
+ for (signum = GDB_SIGNAL_FIRST; signum != GDB_SIGNAL_LAST; ++signum)
+ {
+ /* Can't handle this, so skip it. */
+ if (signum == GDB_SIGNAL_0)
+ continue;
+
+ signame = gdb_signal_to_name (signum);
+
+ /* Ignore the unknown signal case. */
+ if (!signame || strcmp (signame, "?") == 0)
+ continue;
+
+ if (strncasecmp (signame, word, len) == 0)
+ VEC_safe_push (char_ptr, return_val, xstrdup (signame));
+ }
+
+ return return_val;
+}
+
+/* Complete based on an array of strings. */
+
+VEC (char_ptr) *
+string_array_completer (struct cmd_list_element *ignore,
+ char *text, char *word, const char * const strings[],
+ size_t num_strings)
+{
+ size_t i;
+ VEC (char_ptr) *return_val = NULL;
+ size_t len = strlen (word);
+
+ for (i = 0; i < num_strings; ++i)
+ {
+ if (strncasecmp (strings[i], word, len) == 0)
+ VEC_safe_push (char_ptr, return_val, xstrdup (strings[i]));
+ }
+
+ return return_val;
+}
+
/* Get the list of chars that are considered as word breaks
for the current command. */
diff --git a/gdb/completer.h b/gdb/completer.h
index 680bc2d..fa1b213 100644
--- a/gdb/completer.h
+++ b/gdb/completer.h
@@ -41,6 +41,13 @@ extern VEC (char_ptr) *location_completer (struct cmd_list_element *,
extern VEC (char_ptr) *command_completer (struct cmd_list_element *,
char *, char *);
+extern VEC (char_ptr) *signal_completer (struct cmd_list_element *,
+ char *, char *);
+
+extern VEC (char_ptr) *string_array_completer (struct cmd_list_element *,
+ char *, char *,
+ const char * const[], size_t);
+
extern char *get_gdb_completer_quote_characters (void);
extern char *gdb_completion_word_break_characters (void);
diff --git a/gdb/infcmd.c b/gdb/infcmd.c
index 635e577..9eaab06 100644
--- a/gdb/infcmd.c
+++ b/gdb/infcmd.c
@@ -3018,7 +3018,8 @@ all targets."));
add_com ("signal", class_run, signal_command, _("\
Continue program giving it signal specified by the argument.\n\
-An argument of \"0\" means continue program without giving it a signal."));
+An argument of \"0\" means continue program without giving it a signal.\n\
+Use the \"handle\" command to automate signal behavior."));
add_com ("stepi", class_run, stepi_command, _("\
Step one instruction exactly.\n\
diff --git a/gdb/infrun.c b/gdb/infrun.c
index efc4162..19fa6ac 100644
--- a/gdb/infrun.c
+++ b/gdb/infrun.c
@@ -57,6 +57,7 @@
#include "skip.h"
#include "probe.h"
#include "objfiles.h"
+#include "completer.h"
/* Prototypes for local functions */
@@ -6416,6 +6417,34 @@ Are you sure you want to change it? "),
do_cleanups (old_chain);
}
+/* Complete the "handle" command. */
+
+static VEC (char_ptr) *
+handle_completer (struct cmd_list_element *ignore,
+ char *text, char *word)
+{
+ /* First word is a signal, while the rest are keywords. */
+ if (text == word)
+ return signal_completer (ignore, text, word);
+ else
+ {
+ static const char * const keywords[] =
+ {
+ "all",
+ "stop",
+ "ignore",
+ "print",
+ "pass",
+ "nostop",
+ "noignore",
+ "noprint",
+ "nopass",
+ };
+ return string_array_completer (ignore, text, word, keywords,
+ ARRAY_SIZE (keywords));
+ }
+}
+
static void
xdb_handle_command (char *args, int from_tty)
{
@@ -7059,14 +7088,15 @@ _initialize_infrun (void)
{
int i;
int numsigs;
+ struct cmd_list_element *c;
add_info ("signals", signals_info, _("\
What debugger does when program gets various signals.\n\
Specify a signal as argument to print info on that signal only."));
add_info_alias ("handle", "signals", 0);
- add_com ("handle", class_run, handle_command, _("\
-Specify how to handle a signal.\n\
+ c = add_com ("handle", class_run, handle_command, _("\
+Handle signals: handle SIGNAL [KEYWORDS]\n\
Args are signals and actions to apply to those signals.\n\
Symbolic signals (e.g. SIGSEGV) are recommended but numeric signals\n\
from 1-15 are allowed for compatibility with old versions of GDB.\n\
@@ -7080,6 +7110,7 @@ Print means print a message if this signal happens.\n\
Pass means let program see this signal; otherwise program doesn't know.\n\
Ignore is a synonym for nopass and noignore is a synonym for pass.\n\
Pass and Stop may be combined."));
+ set_cmd_completer (c, handle_completer);
if (xdb_commands)
{
add_com ("lz", class_info, signals_info, _("\
^ permalink raw reply [flat|nested] 11+ messages in thread* [patch v2] gdb: add completion handler for "handle" 2012-08-02 3:54 [patch] gdb: add completion handler for "handle" Mike Frysinger @ 2012-08-02 3:58 ` Mike Frysinger 2012-08-02 9:38 ` Yao Qi ` (2 more replies) 2012-08-03 3:51 ` [patch v3] " Mike Frysinger 1 sibling, 3 replies; 11+ messages in thread From: Mike Frysinger @ 2012-08-02 3:58 UTC (permalink / raw) To: gdb-patches The command line completion has spoiled me. Thus the lack of completion with the "handle" command annoys me. Patch! This does a few things: - adds a generic signal completer - adds a generic completer based on a specified array of strings - adds a completion handler for the "handle" command - adds a completion handler for the "signal" command - improves the "signal" and "handle" help strings slightly Signed-off-by: Mike Frysinger <vapier@gentoo.org> v2 - i'm dumb and realized that the "signal" command could easily use the new signal completer too 2012-08-01 Mike Frysinger <vapier@gentoo.org> * completer.c: Include gdb_signals.h. (signal_completer): Define. (string_array_completer): Define. * completer.h (signal_completer): Add prototype. (string_array_completer): Likewise. * infcmd.c (_initialize_infcmd): Add a reference to "handle" in the "string" documentation. Assign the command completer for "signal" to handle_completer. * infrun.c: Include completer.h. (handle_completer): Define. (_initialize_infrun): Declare a new local variable c. Store the result of add_com("handle") to it. Add simple usage to the start of the "handle" documentation. Assign the command completer for "handle" to handle_completer. gdb/completer.c | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++ gdb/completer.h | 7 +++++++ gdb/infcmd.c | 6 ++++-- gdb/infrun.c | 35 +++++++++++++++++++++++++++++++++-- 4 files changed, 96 insertions(+), 4 deletions(-) diff --git a/gdb/completer.c b/gdb/completer.c index b9f0699..1d81e36 100644 --- a/gdb/completer.c +++ b/gdb/completer.c @@ -24,6 +24,7 @@ #include "language.h" #include "gdb_assert.h" #include "exceptions.h" +#include "gdb_signals.h" #include "cli/cli-decode.h" @@ -797,6 +798,57 @@ command_completer (struct cmd_list_element *ignore, strlen (text), handle_help); } +/* Complete on signals. */ + +VEC (char_ptr) * +signal_completer (struct cmd_list_element *ignore, + char *text, char *word) +{ + int i; + VEC (char_ptr) *return_val = NULL; + size_t len = strlen (word); + enum gdb_signal signum; + const char *signame; + + for (signum = GDB_SIGNAL_FIRST; signum != GDB_SIGNAL_LAST; ++signum) + { + /* Can't handle this, so skip it. */ + if (signum == GDB_SIGNAL_0) + continue; + + signame = gdb_signal_to_name (signum); + + /* Ignore the unknown signal case. */ + if (!signame || strcmp (signame, "?") == 0) + continue; + + if (strncasecmp (signame, word, len) == 0) + VEC_safe_push (char_ptr, return_val, xstrdup (signame)); + } + + return return_val; +} + +/* Complete based on an array of strings. */ + +VEC (char_ptr) * +string_array_completer (struct cmd_list_element *ignore, + char *text, char *word, const char * const strings[], + size_t num_strings) +{ + size_t i; + VEC (char_ptr) *return_val = NULL; + size_t len = strlen (word); + + for (i = 0; i < num_strings; ++i) + { + if (strncasecmp (strings[i], word, len) == 0) + VEC_safe_push (char_ptr, return_val, xstrdup (strings[i])); + } + + return return_val; +} + /* Get the list of chars that are considered as word breaks for the current command. */ diff --git a/gdb/completer.h b/gdb/completer.h index 680bc2d..fa1b213 100644 --- a/gdb/completer.h +++ b/gdb/completer.h @@ -41,6 +41,13 @@ extern VEC (char_ptr) *location_completer (struct cmd_list_element *, extern VEC (char_ptr) *command_completer (struct cmd_list_element *, char *, char *); +extern VEC (char_ptr) *signal_completer (struct cmd_list_element *, + char *, char *); + +extern VEC (char_ptr) *string_array_completer (struct cmd_list_element *, + char *, char *, + const char * const[], size_t); + extern char *get_gdb_completer_quote_characters (void); extern char *gdb_completion_word_break_characters (void); diff --git a/gdb/infcmd.c b/gdb/infcmd.c index 635e577..b76ee96 100644 --- a/gdb/infcmd.c +++ b/gdb/infcmd.c @@ -3016,9 +3016,11 @@ Disconnect from a target.\n\ The target will wait for another debugger to connect. Not available for\n\ all targets.")); - add_com ("signal", class_run, signal_command, _("\ + c = add_com ("signal", class_run, signal_command, _("\ Continue program giving it signal specified by the argument.\n\ -An argument of \"0\" means continue program without giving it a signal.")); +An argument of \"0\" means continue program without giving it a signal.\n\ +Use the \"handle\" command to automate signal behavior.")); + set_cmd_completer (c, signal_completer); add_com ("stepi", class_run, stepi_command, _("\ Step one instruction exactly.\n\ diff --git a/gdb/infrun.c b/gdb/infrun.c index efc4162..19fa6ac 100644 --- a/gdb/infrun.c +++ b/gdb/infrun.c @@ -57,6 +57,7 @@ #include "skip.h" #include "probe.h" #include "objfiles.h" +#include "completer.h" /* Prototypes for local functions */ @@ -6416,6 +6417,34 @@ Are you sure you want to change it? "), do_cleanups (old_chain); } +/* Complete the "handle" command. */ + +static VEC (char_ptr) * +handle_completer (struct cmd_list_element *ignore, + char *text, char *word) +{ + /* First word is a signal, while the rest are keywords. */ + if (text == word) + return signal_completer (ignore, text, word); + else + { + static const char * const keywords[] = + { + "all", + "stop", + "ignore", + "print", + "pass", + "nostop", + "noignore", + "noprint", + "nopass", + }; + return string_array_completer (ignore, text, word, keywords, + ARRAY_SIZE (keywords)); + } +} + static void xdb_handle_command (char *args, int from_tty) { @@ -7059,14 +7088,15 @@ _initialize_infrun (void) { int i; int numsigs; + struct cmd_list_element *c; add_info ("signals", signals_info, _("\ What debugger does when program gets various signals.\n\ Specify a signal as argument to print info on that signal only.")); add_info_alias ("handle", "signals", 0); - add_com ("handle", class_run, handle_command, _("\ -Specify how to handle a signal.\n\ + c = add_com ("handle", class_run, handle_command, _("\ +Handle signals: handle SIGNAL [KEYWORDS]\n\ Args are signals and actions to apply to those signals.\n\ Symbolic signals (e.g. SIGSEGV) are recommended but numeric signals\n\ from 1-15 are allowed for compatibility with old versions of GDB.\n\ @@ -7080,6 +7110,7 @@ Print means print a message if this signal happens.\n\ Pass means let program see this signal; otherwise program doesn't know.\n\ Ignore is a synonym for nopass and noignore is a synonym for pass.\n\ Pass and Stop may be combined.")); + set_cmd_completer (c, handle_completer); if (xdb_commands) { add_com ("lz", class_info, signals_info, _("\ ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [patch v2] gdb: add completion handler for "handle" 2012-08-02 3:58 ` [patch v2] " Mike Frysinger @ 2012-08-02 9:38 ` Yao Qi 2012-08-02 11:24 ` Pedro Alves 2012-08-09 20:34 ` Tom Tromey 2 siblings, 0 replies; 11+ messages in thread From: Yao Qi @ 2012-08-02 9:38 UTC (permalink / raw) To: gdb-patches; +Cc: Mike Frysinger On Wednesday, August 01, 2012 11:58:18 PM Mike Frysinger wrote: > The command line completion has spoiled me. Thus the lack of completion > with the "handle" command annoys me. Patch! > > This does a few things: > - adds a generic signal completer > - adds a generic completer based on a specified array of strings > - adds a completion handler for the "handle" command > - adds a completion handler for the "signal" command > - improves the "signal" and "handle" help strings slightly How about adding a new test in gdb.base/completion.exp? -- Yao (齐尧) ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [patch v2] gdb: add completion handler for "handle" 2012-08-02 3:58 ` [patch v2] " Mike Frysinger 2012-08-02 9:38 ` Yao Qi @ 2012-08-02 11:24 ` Pedro Alves 2012-08-02 15:35 ` Mike Frysinger 2012-08-09 20:34 ` Tom Tromey 2 siblings, 1 reply; 11+ messages in thread From: Pedro Alves @ 2012-08-02 11:24 UTC (permalink / raw) To: Mike Frysinger; +Cc: gdb-patches On 08/02/2012 04:58 AM, Mike Frysinger wrote: > The command line completion has spoiled me. Thus the lack of completion with > the "handle" command annoys me. Patch! Nice! > This does a few things: > - adds a generic signal completer > - adds a generic completer based on a specified array of strings > - adds a completion handler for the "handle" command > - adds a completion handler for the "signal" command > - improves the "signal" and "handle" help strings slightly > > Signed-off-by: Mike Frysinger <vapier@gentoo.org> > > v2 > - i'm dumb and realized that the "signal" command could easily use the > new signal completer too > > 2012-08-01 Mike Frysinger <vapier@gentoo.org> > > * completer.c: Include gdb_signals.h. > (signal_completer): Define. > (string_array_completer): Define. > * completer.h (signal_completer): Add prototype. > (string_array_completer): Likewise. > * infcmd.c (_initialize_infcmd): Add a reference to "handle" > in the "string" documentation. Assign the command > completer for "signal" to handle_completer. > * infrun.c: Include completer.h. > (handle_completer): Define. > (_initialize_infrun): Declare a new local variable c. Store the > result of add_com("handle") to it. Add simple usage to > the start of the "handle" documentation. Assign the command > completer for "handle" to handle_completer. > > gdb/completer.c | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++ > gdb/completer.h | 7 +++++++ > gdb/infcmd.c | 6 ++++-- > gdb/infrun.c | 35 +++++++++++++++++++++++++++++++++-- > 4 files changed, 96 insertions(+), 4 deletions(-) > > diff --git a/gdb/completer.c b/gdb/completer.c > index b9f0699..1d81e36 100644 > --- a/gdb/completer.c > +++ b/gdb/completer.c > @@ -24,6 +24,7 @@ > #include "language.h" > #include "gdb_assert.h" > #include "exceptions.h" > +#include "gdb_signals.h" > > #include "cli/cli-decode.h" > > @@ -797,6 +798,57 @@ command_completer (struct cmd_list_element *ignore, > strlen (text), handle_help); > } > > +/* Complete on signals. */ > + > +VEC (char_ptr) * > +signal_completer (struct cmd_list_element *ignore, > + char *text, char *word) > +{ > + int i; > + VEC (char_ptr) *return_val = NULL; > + size_t len = strlen (word); > + enum gdb_signal signum; > + const char *signame; > + > + for (signum = GDB_SIGNAL_FIRST; signum != GDB_SIGNAL_LAST; ++signum) > + { > + /* Can't handle this, so skip it. */ > + if (signum == GDB_SIGNAL_0) > + continue; > + > + signame = gdb_signal_to_name (signum); > + > + /* Ignore the unknown signal case. */ > + if (!signame || strcmp (signame, "?") == 0) > + continue; > + > + if (strncasecmp (signame, word, len) == 0) > + VEC_safe_push (char_ptr, return_val, xstrdup (signame)); > + } > + > + return return_val; > +} > + > +/* Complete based on an array of strings. */ > + > +VEC (char_ptr) * > +string_array_completer (struct cmd_list_element *ignore, > + char *text, char *word, const char * const strings[], > + size_t num_strings) > +{ > + size_t i; > + VEC (char_ptr) *return_val = NULL; > + size_t len = strlen (word); > + > + for (i = 0; i < num_strings; ++i) > + { > + if (strncasecmp (strings[i], word, len) == 0) > + VEC_safe_push (char_ptr, return_val, xstrdup (strings[i])); > + } > + > + return return_val; > +} > + See complete_on_enum. > /* Get the list of chars that are considered as word breaks > for the current command. */ > > diff --git a/gdb/completer.h b/gdb/completer.h > index 680bc2d..fa1b213 100644 > --- a/gdb/completer.h > +++ b/gdb/completer.h > @@ -41,6 +41,13 @@ extern VEC (char_ptr) *location_completer (struct cmd_list_element *, > extern VEC (char_ptr) *command_completer (struct cmd_list_element *, > char *, char *); > > +extern VEC (char_ptr) *signal_completer (struct cmd_list_element *, > + char *, char *); > + > +extern VEC (char_ptr) *string_array_completer (struct cmd_list_element *, > + char *, char *, > + const char * const[], size_t); > + > extern char *get_gdb_completer_quote_characters (void); > > extern char *gdb_completion_word_break_characters (void); > diff --git a/gdb/infcmd.c b/gdb/infcmd.c > index 635e577..b76ee96 100644 > --- a/gdb/infcmd.c > +++ b/gdb/infcmd.c > @@ -3016,9 +3016,11 @@ Disconnect from a target.\n\ > The target will wait for another debugger to connect. Not available for\n\ > all targets.")); > > - add_com ("signal", class_run, signal_command, _("\ > + c = add_com ("signal", class_run, signal_command, _("\ > Continue program giving it signal specified by the argument.\n\ > -An argument of \"0\" means continue program without giving it a signal.")); > +An argument of \"0\" means continue program without giving it a signal.\n\ > +Use the \"handle\" command to automate signal behavior.")); > + set_cmd_completer (c, signal_completer); > > add_com ("stepi", class_run, stepi_command, _("\ > Step one instruction exactly.\n\ > diff --git a/gdb/infrun.c b/gdb/infrun.c > index efc4162..19fa6ac 100644 > --- a/gdb/infrun.c > +++ b/gdb/infrun.c > @@ -57,6 +57,7 @@ > #include "skip.h" > #include "probe.h" > #include "objfiles.h" > +#include "completer.h" > > /* Prototypes for local functions */ > > @@ -6416,6 +6417,34 @@ Are you sure you want to change it? "), > do_cleanups (old_chain); > } > > +/* Complete the "handle" command. */ > + > +static VEC (char_ptr) * > +handle_completer (struct cmd_list_element *ignore, > + char *text, char *word) > +{ > + /* First word is a signal, while the rest are keywords. */ Actually, "handle" accepts more than one signal. E.g., (gdb) handle SIGCANCEL SIGABRT stop Signal Stop Print Pass to program Description SIGABRT Yes Yes Yes Aborted SIGCANCEL Yes Yes Yes LWP internal signal Can we make that work? Basically, for all but the first arg, you'd accept the union of the signal names, and the possible actions. > + if (text == word) > + return signal_completer (ignore, text, word); > + else > + { > + static const char * const keywords[] = > + { > + "all", > + "stop", > + "ignore", > + "print", > + "pass", > + "nostop", > + "noignore", > + "noprint", > + "nopass", > + }; > + return string_array_completer (ignore, text, word, keywords, > + ARRAY_SIZE (keywords)); You can use the existing complete_on_enum instead. (Just add a NULL terminator to the string array.) > + } > +} > + > static void > xdb_handle_command (char *args, int from_tty) > { > @@ -7059,14 +7088,15 @@ _initialize_infrun (void) > { > int i; > int numsigs; > + struct cmd_list_element *c; > > add_info ("signals", signals_info, _("\ > What debugger does when program gets various signals.\n\ > Specify a signal as argument to print info on that signal only.")); > add_info_alias ("handle", "signals", 0); > > - add_com ("handle", class_run, handle_command, _("\ > -Specify how to handle a signal.\n\ > + c = add_com ("handle", class_run, handle_command, _("\ > +Handle signals: handle SIGNAL [KEYWORDS]\n\ > Args are signals and actions to apply to those signals.\n\ The first line of the doc is special. It's what "apropos" shows. before: (gdb) apropos signals handle -- Specify how to handle a signal info handle -- What debugger does when program gets various signals info signals -- What debugger does when program gets various signals after: (gdb) apropos signals handle -- Handle signals: handle SIGNAL [KEYWORDS] info handle -- What debugger does when program gets various signals info signals -- What debugger does when program gets various signals The old strings looked better here to me. This and the "signal" docu change are a bit of a tangent wrt completion, so split them out, please. > Symbolic signals (e.g. SIGSEGV) are recommended but numeric signals\n\ > from 1-15 are allowed for compatibility with old versions of GDB.\n\ > @@ -7080,6 +7110,7 @@ Print means print a message if this signal happens.\n\ > Pass means let program see this signal; otherwise program doesn't know.\n\ > Ignore is a synonym for nopass and noignore is a synonym for pass.\n\ > Pass and Stop may be combined.")); > + set_cmd_completer (c, handle_completer); > if (xdb_commands) > { > add_com ("lz", class_info, signals_info, _("\ > -- Pedro Alves ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [patch v2] gdb: add completion handler for "handle" 2012-08-02 11:24 ` Pedro Alves @ 2012-08-02 15:35 ` Mike Frysinger 2012-08-02 16:24 ` Pedro Alves 0 siblings, 1 reply; 11+ messages in thread From: Mike Frysinger @ 2012-08-02 15:35 UTC (permalink / raw) To: Pedro Alves; +Cc: gdb-patches [-- Attachment #1: Type: Text/Plain, Size: 3579 bytes --] On Thursday 02 August 2012 07:24:07 Pedro Alves wrote: > On 08/02/2012 04:58 AM, Mike Frysinger wrote: > > +VEC (char_ptr) * > > +string_array_completer (struct cmd_list_element *ignore, > > + char *text, char *word, const char * const strings[], > > + size_t num_strings) > > +{ > > + size_t i; > > + VEC (char_ptr) *return_val = NULL; > > + size_t len = strlen (word); > > + > > + for (i = 0; i < num_strings; ++i) > > + { > > + if (strncasecmp (strings[i], word, len) == 0) > > + VEC_safe_push (char_ptr, return_val, xstrdup (strings[i])); > > + } > > + > > + return return_val; > > +} > > See complete_on_enum. hrm, i was only looking in completer.h. i don't suppose there's a central place for these APIs ? or is that expecting too much ? ;) also, i think this function is broken. when i try to call it, i have: text = "SIGINT a" word = "a" instead of completing "a" into "all", it tries to complete "SIGINT a" and so returns no matches. i'd have to lie and pass it (word, word) instead of (text, word) ... > > +/* Complete the "handle" command. */ > > + > > +static VEC (char_ptr) * > > +handle_completer (struct cmd_list_element *ignore, > > + char *text, char *word) > > +{ > > + /* First word is a signal, while the rest are keywords. */ > > Actually, "handle" accepts more than one signal. E.g., ok, but that's not what the documentation says: http://sourceware.org/gdb/current/onlinedocs/gdb/Signals.html handle signal [keywords...] Change the way gdb handles signal signal. signal can be the number of a signal or its name (with or without the `SIG' at the beginning); a list of signal numbers of the form `low-high'; or the word `all', meaning all the known signals. Optional arguments keywords, described below, say what change to make. guess that needs updating too > (gdb) handle SIGCANCEL SIGABRT stop > Signal Stop Print Pass to program Description > SIGABRT Yes Yes Yes Aborted > SIGCANCEL Yes Yes Yes LWP internal signal > > Can we make that work? Basically, for all but the first arg, you'd > accept the union of the signal names, and the possible actions. is there a VEC_safe_merge helper ? i didn't see anything in common/vec.h. if there was, then it should be easy to make this work. > > - add_com ("handle", class_run, handle_command, _("\ > > -Specify how to handle a signal.\n\ > > + c = add_com ("handle", class_run, handle_command, _("\ > > +Handle signals: handle SIGNAL [KEYWORDS]\n\ > > > > Args are signals and actions to apply to those signals.\n\ > > The first line of the doc is special. It's what "apropos" shows. ok ... > before: > (gdb) apropos signals > handle -- Specify how to handle a signal > info handle -- What debugger does when program gets various signals > info signals -- What debugger does when program gets various signals > > after: > (gdb) apropos signals > handle -- Handle signals: handle SIGNAL [KEYWORDS] > info handle -- What debugger does when program gets various signals > info signals -- What debugger does when program gets various signals > > The old strings looked better here to me. it does. i was just trying to improve the `help handle` output since it (plus `help signal`) suck atm. it's really information dense and hard to pick out anything quickly. > This and the "signal" docu change are a bit of a tangent wrt completion, > so split them out, please. np -mike [-- Attachment #2: This is a digitally signed message part. --] [-- Type: application/pgp-signature, Size: 836 bytes --] ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [patch v2] gdb: add completion handler for "handle" 2012-08-02 15:35 ` Mike Frysinger @ 2012-08-02 16:24 ` Pedro Alves 0 siblings, 0 replies; 11+ messages in thread From: Pedro Alves @ 2012-08-02 16:24 UTC (permalink / raw) To: Mike Frysinger; +Cc: gdb-patches On 08/02/2012 04:34 PM, Mike Frysinger wrote: > On Thursday 02 August 2012 07:24:07 Pedro Alves wrote: >> On 08/02/2012 04:58 AM, Mike Frysinger wrote: >>> +VEC (char_ptr) * >>> +string_array_completer (struct cmd_list_element *ignore, >>> + char *text, char *word, const char * const strings[], >>> + size_t num_strings) >>> +{ >>> + size_t i; >>> + VEC (char_ptr) *return_val = NULL; >>> + size_t len = strlen (word); >>> + >>> + for (i = 0; i < num_strings; ++i) >>> + { >>> + if (strncasecmp (strings[i], word, len) == 0) >>> + VEC_safe_push (char_ptr, return_val, xstrdup (strings[i])); >>> + } >>> + >>> + return return_val; >>> +} >> >> See complete_on_enum. > > hrm, i was only looking in completer.h. i don't suppose there's a central > place for these APIs ? or is that expecting too much ? ;) > > also, i think this function is broken. when i try to call it, i have: > text = "SIGINT a" > word = "a" > > instead of completing "a" into "all", it tries to complete "SIGINT a" and so > returns no matches. i'd have to lie and pass it (word, word) instead of > (text, word) ... I think it's the documentation or parameter names of the function that might not be as clear as possible. /* Return a vector of char pointers which point to the different possible completions in CMD of TEXT. WORD points in the same buffer as TEXT, and completions should be returned relative to this position. For example, suppose TEXT is "foo" and we want to complete to "foobar". If WORD is "oo", return "oobar"; if WORD is "baz/foo", return "baz/foobar". */ From the example, we see that is is TEXT that points at the word that needs to be completed. WORD might start before or after the beginning of the word that is to be completed. E.g., this comment of this related function says more or less the same: /* Generate completions all at once. Returns a vector of strings. Each element is allocated with xmalloc. It can also return NULL if there are no completions. TEXT is the caller's idea of the "word" we are looking at. LINE_BUFFER is available to be looked at; it contains the entire text of the line. POINT is the offset in that line of the cursor. You should pretend that the line ends at POINT. */ VEC (char_ptr) * complete_line (const char *text, char *line_buffer, int point) "text" being the word, and having a parameter named "word" at the same time isn't a happy choice of naming... So if we just swap the args: text = "a" word = "SIGINT a" completing that yields "SIGINT all". But that's not what we want. So to complete "a" into "all", we need to have WORD also pointing at "a". passing it (word, word) is therefore not really a lie, but the right thing for this interface. > >>> +/* Complete the "handle" command. */ >>> + >>> +static VEC (char_ptr) * >>> +handle_completer (struct cmd_list_element *ignore, >>> + char *text, char *word) >>> +{ >>> + /* First word is a signal, while the rest are keywords. */ >> >> Actually, "handle" accepts more than one signal. E.g., > > ok, but that's not what the documentation says: > http://sourceware.org/gdb/current/onlinedocs/gdb/Signals.html > > handle signal [keywords...] > Change the way gdb handles signal signal. signal can be the number of a > signal or its name (with or without the `SIG' at the beginning); a list of > signal numbers of the form `low-high'; or the word `all', meaning all the > known signals. Optional arguments keywords, described below, say what change > to make. > > guess that needs updating too Indeed. The online help already says such a thing: (gdb) help handle Specify how to handle a signal. Args are signals and actions to apply to those signals. "signals". And it's not an accident, since the code says: /* Walk through the args, looking for signal oursigs, signal names, and actions. Signal numbers and signal names may be interspersed with actions, with the actions being performed for all signals cumulatively specified. Signal ranges can be specified as <LOW>-<HIGH>. */ > >> (gdb) handle SIGCANCEL SIGABRT stop >> Signal Stop Print Pass to program Description >> SIGABRT Yes Yes Yes Aborted >> SIGCANCEL Yes Yes Yes LWP internal signal >> >> Can we make that work? Basically, for all but the first arg, you'd >> accept the union of the signal names, and the possible actions. ("handle stop" with no signal specified is accepted without error, though it's a nop. If it's easier for the completer to not special case the first arg, by all means.) > > is there a VEC_safe_merge helper ? i didn't see anything in common/vec.h. if > there was, then it should be easy to make this work. There isn't, but feel free to add one. :-) You can do VEC_safe_grow, and then memcpy + VEC_address. There's something similar in insert_catch_syscall. > >>> - add_com ("handle", class_run, handle_command, _("\ >>> -Specify how to handle a signal.\n\ >>> + c = add_com ("handle", class_run, handle_command, _("\ >>> +Handle signals: handle SIGNAL [KEYWORDS]\n\ >>> >>> Args are signals and actions to apply to those signals.\n\ >> >> The first line of the doc is special. It's what "apropos" shows. > > ok ... > >> before: >> (gdb) apropos signals >> handle -- Specify how to handle a signal >> info handle -- What debugger does when program gets various signals >> info signals -- What debugger does when program gets various signals >> >> after: >> (gdb) apropos signals >> handle -- Handle signals: handle SIGNAL [KEYWORDS] >> info handle -- What debugger does when program gets various signals >> info signals -- What debugger does when program gets various signals >> >> The old strings looked better here to me. > > it does. i was just trying to improve the `help handle` output since it (plus > `help signal`) suck atm. it's really information dense and hard to pick out > anything quickly. And that's much appreciated. > >> This and the "signal" docu change are a bit of a tangent wrt completion, >> so split them out, please. > > np > -mike > -- Pedro Alves ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [patch v2] gdb: add completion handler for "handle" 2012-08-02 3:58 ` [patch v2] " Mike Frysinger 2012-08-02 9:38 ` Yao Qi 2012-08-02 11:24 ` Pedro Alves @ 2012-08-09 20:34 ` Tom Tromey 2012-08-09 20:46 ` Mike Frysinger 2 siblings, 1 reply; 11+ messages in thread From: Tom Tromey @ 2012-08-09 20:34 UTC (permalink / raw) To: Mike Frysinger; +Cc: gdb-patches >>>>> "Mike" == Mike Frysinger <vapier@gentoo.org> writes: Mike> + c = add_com ("handle", class_run, handle_command, _("\ Mike> +Handle signals: handle SIGNAL [KEYWORDS]\n\ Mike> Args are signals and actions to apply to those signals.\n\ Mike> Symbolic signals (e.g. SIGSEGV) are recommended but numeric signals\n\ I didn't see this in v3, but FWIW it is normal-ish now to add a usage line. Say, something like: Change the way GDB handles signals. Usage: handle SIGNAL [SIGNAL | KEYWORD]... ... or whatever. Tom ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [patch v2] gdb: add completion handler for "handle" 2012-08-09 20:34 ` Tom Tromey @ 2012-08-09 20:46 ` Mike Frysinger 0 siblings, 0 replies; 11+ messages in thread From: Mike Frysinger @ 2012-08-09 20:46 UTC (permalink / raw) To: Tom Tromey; +Cc: gdb-patches [-- Attachment #1: Type: Text/Plain, Size: 555 bytes --] On Thursday 09 August 2012 16:34:28 Tom Tromey wrote: > >>>>> "Mike" == Mike Frysinger <vapier@gentoo.org> writes: > Mike> + c = add_com ("handle", class_run, handle_command, _("\ > Mike> +Handle signals: handle SIGNAL [KEYWORDS]\n\ > Mike> Args are signals and actions to apply to those signals.\n\ > Mike> Symbolic signals (e.g. SIGSEGV) are recommended but numeric > signals\n\ > > I didn't see this in v3 yeah, we decided to split the help strings out into a diff patch. i'll follow up once the completion logic is finished. -mike [-- Attachment #2: This is a digitally signed message part. --] [-- Type: application/pgp-signature, Size: 836 bytes --] ^ permalink raw reply [flat|nested] 11+ messages in thread
* [patch v3] gdb: add completion handler for "handle" 2012-08-02 3:54 [patch] gdb: add completion handler for "handle" Mike Frysinger 2012-08-02 3:58 ` [patch v2] " Mike Frysinger @ 2012-08-03 3:51 ` Mike Frysinger 2012-08-09 20:32 ` Tom Tromey 1 sibling, 1 reply; 11+ messages in thread From: Mike Frysinger @ 2012-08-03 3:51 UTC (permalink / raw) To: gdb-patches [-- Attachment #1: Type: Text/Plain, Size: 11113 bytes --] The command line completion has spoiled me. Thus the lack of completion with the "handle" command annoys me. Patch! This does a few things: - adds a VEC_merge helper - adds a generic signal completer - adds a completion handler for the "handle" command - sets the completion handler for the "signal" command Signed-off-by: Mike Frysinger <vapier@gentoo.org> v3 - replace new array completer with existing enum completer - add a new VEC_merge helper - improve the handle completer to match existing behavior - drop handle/signal docstring changes 2012-08-01 Mike Frysinger <vapier@gentoo.org> * vec.h (VEC_merge): Define. (DEF_VEC_ALLOC_FUNC_I): Add a merge helper. (DEF_VEC_ALLOC_FUNC_P): Likewise. (DEF_VEC_ALLOC_FUNC_O): Likewise. * completer.c: Include gdb_signals.h. (signal_completer): Define. * completer.h (signal_completer): Add prototype. * infcmd.c (_initialize_infcmd): Assign the command completer for "signal" to handle_completer. * infrun.c: Include completer.h. (handle_completer): Define. (_initialize_infrun): Declare a new local variable c. Store the result of add_com("handle") to it. Assign the command completer for "handle" to handle_completer. 2012-08-01 Mike Frysinger <vapier@gentoo.org> * gdb.base/completion.exp: Add tests for handle completion. gdb/common/vec.h | 72 +++++++++++++++++++++++++++++++++ gdb/completer.c | 32 +++++++++++++++ gdb/completer.h | 3 ++ gdb/infcmd.c | 3 +- gdb/infrun.c | 35 +++++++++++++++- gdb/testsuite/gdb.base/completion.exp | 18 +++++++++ 6 files changed, 161 insertions(+), 2 deletions(-) diff --git a/gdb/common/vec.h b/gdb/common/vec.h index fa15370..d16b604 100644 --- a/gdb/common/vec.h +++ b/gdb/common/vec.h @@ -212,6 +212,13 @@ #define VEC_copy(T,V) (VEC_OP(T,copy)(V)) +/* Merge two vectors. + VEC(T,A) *VEC_T_merge(VEC(T) *, VEC(T) *); + + Copy the live elements of both vectors into a new vector. The new + and old vectors need not be allocated by the same mechanism. */ +#define VEC_merge(T,V1,V2) (VEC_OP(T,merge)(V1, V2)) + /* Determine if a vector has additional capacity. int VEC_T_space (VEC(T) *v,int reserve) @@ -463,6 +470,28 @@ static inline VEC(T) *VEC_OP (T,copy) (VEC(T) *vec_) \ return new_vec_; \ } \ \ +static inline VEC(T) *VEC_OP (T,merge) (VEC(T) *vec1_, VEC(T) *vec2_) \ +{ \ + if (vec1_ && vec2_) \ + { \ + size_t len_ = vec1_->num + vec2_->num; \ + VEC (T) *new_vec_ = NULL; \ + \ + /* We must request exact size allocation, hence the negation. */ \ + new_vec_ = (VEC (T) *) \ + vec_o_reserve (NULL, -len_, offsetof (VEC(T),vec), sizeof (T)); \ + \ + new_vec_->num = len_; \ + memcpy (new_vec_->vec, vec1_->vec, sizeof (T) * vec1_->num); \ + memcpy (new_vec_->vec + vec1_->num, vec2_->vec, \ + sizeof (T) * vec2_->num); \ + \ + return new_vec_; \ + } \ + else \ + return VEC_copy (T, vec1_ ? vec1_ : vec2_); \ +} \ + \ static inline void VEC_OP (T,free) \ (VEC(T) **vec_) \ { \ @@ -743,6 +772,27 @@ static inline VEC(T) *VEC_OP (T,copy) (VEC(T) *vec_) \ return new_vec_; \ } \ \ +static inline VEC(T) *VEC_OP (T,merge) (VEC(T) *vec1_, VEC(T) *vec2_) \ +{ \ + if (vec1_ && vec2_) \ + { \ + size_t len_ = vec1_->num + vec2_->num; \ + VEC (T) *new_vec_ = NULL; \ + \ + /* We must request exact size allocation, hence the negation. */ \ + new_vec_ = (VEC (T) *)(vec_p_reserve (NULL, -len_)); \ + \ + new_vec_->num = len_; \ + memcpy (new_vec_->vec, vec1_->vec, sizeof (T) * vec1_->num); \ + memcpy (new_vec_->vec + vec1_->num, vec2_->vec, \ + sizeof (T) * vec2_->num); \ + \ + return new_vec_; \ + } \ + else \ + return VEC_copy (T, vec1_ ? vec1_ : vec2_); \ +} \ + \ static inline int VEC_OP (T,reserve) \ (VEC(T) **vec_, int alloc_ VEC_ASSERT_DECL) \ { \ @@ -977,6 +1027,28 @@ static inline VEC(T) *VEC_OP (T,copy) (VEC(T) *vec_) \ return new_vec_; \ } \ \ +static inline VEC(T) *VEC_OP (T,merge) (VEC(T) *vec1_, VEC(T) *vec2_) \ +{ \ + if (vec1_ && vec2_) \ + { \ + size_t len_ = vec1_->num + vec2_->num; \ + VEC (T) *new_vec_ = NULL; \ + \ + /* We must request exact size allocation, hence the negation. */ \ + new_vec_ = (VEC (T) *) \ + vec_o_reserve (NULL, -len_, offsetof (VEC(T),vec), sizeof (T)); \ + \ + new_vec_->num = len_; \ + memcpy (new_vec_->vec, vec1_->vec, sizeof (T) * vec1_->num); \ + memcpy (new_vec_->vec + vec1_->num, vec2_->vec, \ + sizeof (T) * vec2_->num); \ + \ + return new_vec_; \ + } \ + else \ + return VEC_copy (T, vec1_ ? vec1_ : vec2_); \ +} \ + \ static inline void VEC_OP (T,free) \ (VEC(T) **vec_) \ { \ diff --git a/gdb/completer.c b/gdb/completer.c index b9f0699..2002578 100644 --- a/gdb/completer.c +++ b/gdb/completer.c @@ -24,6 +24,7 @@ #include "language.h" #include "gdb_assert.h" #include "exceptions.h" +#include "gdb_signals.h" #include "cli/cli-decode.h" @@ -797,6 +798,37 @@ command_completer (struct cmd_list_element *ignore, strlen (text), handle_help); } +/* Complete on signals. */ + +VEC (char_ptr) * +signal_completer (struct cmd_list_element *ignore, + char *text, char *word) +{ + int i; + VEC (char_ptr) *return_val = NULL; + size_t len = strlen (word); + enum gdb_signal signum; + const char *signame; + + for (signum = GDB_SIGNAL_FIRST; signum != GDB_SIGNAL_LAST; ++signum) + { + /* Can't handle this, so skip it. */ + if (signum == GDB_SIGNAL_0) + continue; + + signame = gdb_signal_to_name (signum); + + /* Ignore the unknown signal case. */ + if (!signame || strcmp (signame, "?") == 0) + continue; + + if (strncasecmp (signame, word, len) == 0) + VEC_safe_push (char_ptr, return_val, xstrdup (signame)); + } + + return return_val; +} + /* Get the list of chars that are considered as word breaks for the current command. */ diff --git a/gdb/completer.h b/gdb/completer.h index 680bc2d..fddfa42 100644 --- a/gdb/completer.h +++ b/gdb/completer.h @@ -41,6 +41,9 @@ extern VEC (char_ptr) *location_completer (struct cmd_list_element *, extern VEC (char_ptr) *command_completer (struct cmd_list_element *, char *, char *); +extern VEC (char_ptr) *signal_completer (struct cmd_list_element *, + char *, char *); + extern char *get_gdb_completer_quote_characters (void); extern char *gdb_completion_word_break_characters (void); diff --git a/gdb/infcmd.c b/gdb/infcmd.c index 635e577..d56503c 100644 --- a/gdb/infcmd.c +++ b/gdb/infcmd.c @@ -3016,9 +3016,10 @@ Disconnect from a target.\n\ The target will wait for another debugger to connect. Not available for\n\ all targets.")); - add_com ("signal", class_run, signal_command, _("\ + c = add_com ("signal", class_run, signal_command, _("\ Continue program giving it signal specified by the argument.\n\ An argument of \"0\" means continue program without giving it a signal.")); + set_cmd_completer (c, signal_completer); add_com ("stepi", class_run, stepi_command, _("\ Step one instruction exactly.\n\ diff --git a/gdb/infrun.c b/gdb/infrun.c index cf6c062..4f59a92 100644 --- a/gdb/infrun.c +++ b/gdb/infrun.c @@ -57,6 +57,7 @@ #include "skip.h" #include "probe.h" #include "objfiles.h" +#include "completer.h" /* Prototypes for local functions */ @@ -6416,6 +6417,36 @@ Are you sure you want to change it? "), do_cleanups (old_chain); } +/* Complete the "handle" command. */ + +static VEC (char_ptr) * +handle_completer (struct cmd_list_element *ignore, + char *text, char *word) +{ + VEC (char_ptr) *vec_signals, *vec_keywords, *return_val; + static const char * const keywords[] = + { + "all", + "stop", + "ignore", + "print", + "pass", + "nostop", + "noignore", + "noprint", + "nopass", + NULL, + }; + + vec_signals = signal_completer (ignore, text, word); + vec_keywords = complete_on_enum (keywords, word, word); + + return_val = VEC_merge (char_ptr, vec_signals, vec_keywords); + VEC_free (char_ptr, vec_signals); + VEC_free (char_ptr, vec_keywords); + return return_val; +} + static void xdb_handle_command (char *args, int from_tty) { @@ -7059,13 +7090,14 @@ _initialize_infrun (void) { int i; int numsigs; + struct cmd_list_element *c; add_info ("signals", signals_info, _("\ What debugger does when program gets various signals.\n\ Specify a signal as argument to print info on that signal only.")); add_info_alias ("handle", "signals", 0); - add_com ("handle", class_run, handle_command, _("\ + c = add_com ("handle", class_run, handle_command, _("\ Specify how to handle a signal.\n\ Args are signals and actions to apply to those signals.\n\ Symbolic signals (e.g. SIGSEGV) are recommended but numeric signals\n\ @@ -7080,6 +7112,7 @@ Print means print a message if this signal happens.\n\ Pass means let program see this signal; otherwise program doesn't know.\n\ Ignore is a synonym for nopass and noignore is a synonym for pass.\n\ Pass and Stop may be combined.")); + set_cmd_completer (c, handle_completer); if (xdb_commands) { add_com ("lz", class_info, signals_info, _("\ diff --git a/gdb/testsuite/gdb.base/completion.exp b/gdb/testsuite/gdb.base/completion.exp index 9b9459c..71b9227 100644 --- a/gdb/testsuite/gdb.base/completion.exp +++ b/gdb/testsuite/gdb.base/completion.exp @@ -363,6 +363,24 @@ gdb_test_multiple "" "$test" { } } +set test "complete 'handle signal'" +send_gdb "handle sigq\t" +gdb_test_multiple "" "$test" { + -re "^handle SIGQUIT $" { + send_gdb "\n" + pass "$test" + } +} + +set test "complete 'handle keyword'" +send_gdb "handle nos\t" +gdb_test_multiple "" "$test" { + -re "^handle nostop $" { + send_gdb "\n" + pass "$test" + } +} + # These tests used to try completing the shorter "p b-a". # Unfortunately, on some systems, there are .o files in system [-- Attachment #2: This is a digitally signed message part. --] [-- Type: application/pgp-signature, Size: 836 bytes --] ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [patch v3] gdb: add completion handler for "handle" 2012-08-03 3:51 ` [patch v3] " Mike Frysinger @ 2012-08-09 20:32 ` Tom Tromey 2012-08-10 5:03 ` Mike Frysinger 0 siblings, 1 reply; 11+ messages in thread From: Tom Tromey @ 2012-08-09 20:32 UTC (permalink / raw) To: Mike Frysinger; +Cc: gdb-patches >>>>> "Mike" == Mike Frysinger <vapier@gentoo.org> writes: Mike> The command line completion has spoiled me. Thus the lack of completion with Mike> the "handle" command annoys me. Patch! Mike> This does a few things: Mike> - adds a VEC_merge helper Mike> - adds a generic signal completer Mike> - adds a completion handler for the "handle" command Mike> - sets the completion handler for the "signal" command This is PR 10436; so please note that in the ChangeLog. This is ok, thanks. Tom ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [patch v3] gdb: add completion handler for "handle" 2012-08-09 20:32 ` Tom Tromey @ 2012-08-10 5:03 ` Mike Frysinger 0 siblings, 0 replies; 11+ messages in thread From: Mike Frysinger @ 2012-08-10 5:03 UTC (permalink / raw) To: Tom Tromey; +Cc: gdb-patches [-- Attachment #1: Type: Text/Plain, Size: 619 bytes --] On Thursday 09 August 2012 16:31:36 Tom Tromey wrote: > >>>>> "Mike" == Mike Frysinger <vapier@gentoo.org> writes: > Mike> The command line completion has spoiled me. Thus the lack of > completion with Mike> the "handle" command annoys me. Patch! > > Mike> This does a few things: > Mike> - adds a VEC_merge helper > Mike> - adds a generic signal completer > Mike> - adds a completion handler for the "handle" command > Mike> - sets the completion handler for the "signal" command > > This is PR 10436; so please note that in the ChangeLog. > This is ok, thanks. done & committed, thanks -mike [-- Attachment #2: This is a digitally signed message part. --] [-- Type: application/pgp-signature, Size: 836 bytes --] ^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2012-08-10 5:03 UTC | newest] Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2012-08-02 3:54 [patch] gdb: add completion handler for "handle" Mike Frysinger 2012-08-02 3:58 ` [patch v2] " Mike Frysinger 2012-08-02 9:38 ` Yao Qi 2012-08-02 11:24 ` Pedro Alves 2012-08-02 15:35 ` Mike Frysinger 2012-08-02 16:24 ` Pedro Alves 2012-08-09 20:34 ` Tom Tromey 2012-08-09 20:46 ` Mike Frysinger 2012-08-03 3:51 ` [patch v3] " Mike Frysinger 2012-08-09 20:32 ` Tom Tromey 2012-08-10 5:03 ` Mike Frysinger
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox