From: Keith Seitz <keiths@redhat.com>
To: gdb-patches@sourceware.org
Subject: [PATCH v3 00/19] New completer API
Date: Fri, 07 Aug 2015 02:37:00 -0000 [thread overview]
Message-ID: <20150806191404.32159.50755.stgit@valrhona.uglyboxes.com> (raw)
This series (v3) of patches contains numerous little fixes, plus two major
additions:
1) Since v2, new TUI completion functions have been introduced. These have
been updated/converted to the new API.
2) Many completion functions used to do a "partial copy" of the matching
text. This oft-repeated code has been removed from all the completion
functions and incorporated internally to the API.
---
Currently completer functions are not required to implement completion-
limiting. These functions will compute all possible completions and then
rely on complete_line to limit the result.
The main goal of this patchset is to require completer functions to
implement proper completion-limiting using maybe_add_completion. This
actually cleans up the completer API significantly and fixes at least one
serious bug (an assertion failure, gdb/17960).
The new API requires all completions to be added to the completion
list using maybe_add_completion:
void
my_completer_function (struct completer_data *cdata,
struct cmd_list_element *cmd,
const char *text, const char *word)
{
while (/* there are more completions to look for */)
{
char *match = xstrdup (a_completion_match);
if (add_completion (cdata, match, text /* or NULL */,
word /* or NULL */))
== ADD_COMPLETION_MAX_REACHED)
return;
}
}
All patches have been regression tested for buildbot.
---
Keith Seitz (19):
Add struct completer_data to the completion API.
Remove completion_tracker_t from the public completion API.
Implement completion-limiting for complete_on_cmdlist.
Implement completion limiting for add_filename_to_list.
Implement completion limiting for ada_make_symbol_completion_list.
Implement completion limiting for condition_completer.
Implement completion limiting for filename_completer.
Implement completion limiting for signal_completer.
Implement completion limiting for interpreter_completer.
Implement completion limiting for cmdpy_completer.
Implement completion limiting for reg_or_group_completer.
Implement completion limiting for sim_command_completer.
Implement completion limiting for complete_on_enum.
Implement completion limiting in add_struct_fields.
Implement completion limiting for scmcmd_add_completion.
Implement completion limiting for tui_reggroup_completer.
Make the completion API completely opaque.
Use the hashtable to accumulate completion results.
Remove the vector return result from the completion API.
gdb/ada-lang.c | 85 ++--
gdb/break-catch-syscall.c | 11 -
gdb/breakpoint.c | 22 +
gdb/cli/cli-cmds.c | 4
gdb/cli/cli-decode.c | 75 +---
gdb/command.h | 17 +
gdb/completer.c | 537 +++++++++++++++++-----------
gdb/completer.h | 115 +++---
gdb/corefile.c | 7
gdb/cp-abi.c | 7
gdb/f-lang.c | 8
gdb/guile/scm-cmd.c | 34 +-
gdb/infrun.c | 15 -
gdb/interps.c | 29 --
gdb/language.h | 8
gdb/python/py-cmd.c | 29 +-
gdb/remote-sim.c | 18 +
gdb/symtab.c | 304 ++++++----------
gdb/symtab.h | 47 +-
gdb/testsuite/gdb.ada/complete.exp | 144 +++++++-
gdb/testsuite/gdb.ada/complete/foo.adb | 4
gdb/testsuite/gdb.ada/complete/pck.ads | 12 +
gdb/testsuite/gdb.base/break.c | 14 +
gdb/testsuite/gdb.base/break.exp | 4
gdb/testsuite/gdb.base/completion.exp | 215 +++++++++++
gdb/testsuite/gdb.base/condbreak.exp | 70 ++++
gdb/testsuite/gdb.base/filesym.c | 4
gdb/testsuite/gdb.base/filesym.exp | 84 ++++
gdb/testsuite/gdb.base/filesym2.c | 24 +
gdb/testsuite/gdb.base/filesym3.c | 24 +
gdb/testsuite/gdb.base/filesym4.c | 24 +
gdb/testsuite/gdb.base/filesym5.c | 22 +
gdb/testsuite/gdb.cp/cpcompletion.exp | 55 +++
gdb/testsuite/gdb.cp/pr9594.cc | 28 +
gdb/testsuite/gdb.guile/scm-cmd.exp | 24 +
gdb/testsuite/gdb.python/py-completion.exp | 45 ++
gdb/tui/tui-layout.c | 7
gdb/tui/tui-regs.c | 16 -
gdb/tui/tui-win.c | 28 +
gdb/value.c | 14 -
gdb/value.h | 3
41 files changed, 1496 insertions(+), 741 deletions(-)
create mode 100644 gdb/testsuite/gdb.base/filesym2.c
create mode 100644 gdb/testsuite/gdb.base/filesym3.c
create mode 100644 gdb/testsuite/gdb.base/filesym4.c
create mode 100644 gdb/testsuite/gdb.base/filesym5.c
next reply other threads:[~2015-08-07 2:37 UTC|newest]
Thread overview: 45+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-07 2:37 Keith Seitz [this message]
2015-08-06 19:18 ` [PATCH v3 09/19] Implement completion limiting for interpreter_completer Keith Seitz
2015-08-23 4:03 ` Doug Evans
2015-08-06 19:20 ` [PATCH v3 12/19] Implement completion limiting for sim_command_completer Keith Seitz
2015-08-23 4:11 ` Doug Evans
2015-08-06 19:58 ` [PATCH v3 06/19] Implement completion limiting for condition_completer Keith Seitz
2015-08-23 3:53 ` Doug Evans
2015-08-06 19:58 ` [PATCH v3 18/19] Use the hashtable to accumulate completion results Keith Seitz
2015-08-23 17:53 ` Doug Evans
2015-08-06 19:58 ` [PATCH v3 02/19] Remove completion_tracker_t from the public completion API Keith Seitz
2015-08-23 1:02 ` Doug Evans
2015-08-24 16:06 ` Doug Evans
2015-08-06 19:58 ` [PATCH v3 19/19] Remove the vector return result from the " Keith Seitz
2015-08-23 18:03 ` Doug Evans
2015-08-06 19:58 ` [PATCH v3 04/19] Implement completion limiting for add_filename_to_list Keith Seitz
2015-08-23 1:07 ` Doug Evans
2015-08-06 20:03 ` [PATCH v3 01/19] Add struct completer_data to the completion API Keith Seitz
2015-08-23 0:29 ` Doug Evans
2015-08-06 21:06 ` [PATCH v3 17/19] Make the completion API completely opaque Keith Seitz
2015-08-23 15:14 ` Doug Evans
2015-08-06 21:06 ` [PATCH v3 05/19] Implement completion limiting for ada_make_symbol_completion_list Keith Seitz
2015-08-23 3:47 ` Doug Evans
2015-08-06 22:03 ` [PATCH v3 13/19] Implement completion limiting for complete_on_enum Keith Seitz
2015-08-23 4:19 ` Doug Evans
2015-08-06 22:03 ` [PATCH v3 08/19] Implement completion limiting for signal_completer Keith Seitz
2015-08-23 3:59 ` Doug Evans
2015-08-06 22:03 ` [PATCH v3 11/19] Implement completion limiting for reg_or_group_completer Keith Seitz
2015-08-23 4:09 ` Doug Evans
2015-08-06 22:03 ` [PATCH v3 07/19] Implement completion limiting for filename_completer Keith Seitz
2015-08-23 3:58 ` Doug Evans
2015-08-06 22:03 ` [PATCH v3 16/19] Implement completion limiting for tui_reggroup_completer Keith Seitz
2015-08-23 4:25 ` Doug Evans
2015-08-06 22:12 ` [PATCH v3 10/19] Implement completion limiting for cmdpy_completer Keith Seitz
2015-08-23 4:07 ` Doug Evans
2015-08-06 22:12 ` [PATCH v3 14/19] Implement completion limiting in add_struct_fields Keith Seitz
2015-08-23 4:23 ` Doug Evans
2015-08-06 22:36 ` [PATCH v3 03/19] Implement completion-limiting for complete_on_cmdlist Keith Seitz
2015-08-23 1:05 ` Doug Evans
2015-08-07 2:37 ` [PATCH v3 15/19] Implement completion limiting for scmcmd_add_completion Keith Seitz
2015-08-23 4:24 ` Doug Evans
2015-08-07 22:57 ` [PATCH v3 00/19] New completer API Andrew Burgess
2015-08-08 0:04 ` Keith Seitz
2015-08-08 6:44 ` Andrew Burgess
2015-08-08 16:25 ` Keith Seitz
2015-08-22 22:25 ` Doug Evans
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150806191404.32159.50755.stgit@valrhona.uglyboxes.com \
--to=keiths@redhat.com \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox