From: Andrew Burgess <aburgess@redhat.com>
To: gdb-patches@sourceware.org
Cc: Andrew Burgess <aburgess@redhat.com>
Subject: [PATCHv4 00/14] Further filename completion improvements
Date: Thu, 4 Jul 2024 15:20:55 +0100 [thread overview]
Message-ID: <cover.1720101826.git.aburgess@redhat.com> (raw)
In-Reply-To: <cover.1717594477.git.aburgess@redhat.com>
In V4:
- Tom asked about V3: "...did you consider changing gdb to have a
single way to pass a filename to a command?". Well, I've not done
that.
But, I have ensured that doing this would be possible in the
future, and I've added two patches (the last two) that change a
few commands.
There are two reasons for no changing everyhing in this series,
first I'd probably not change all commands in one commit, that one
commit would be huge, so chaning all the commits would add even
more commits to this already large series. And second, changing
the commands is a breaking change, while just chaning the
completion (in line with current command behaviour) is
non-breaking.
- As such, if folk get nervous about changing the command behaviour,
the last two patches of V4 should be considered optional. Patches
1 to 12 are all either new functionality, or non-breaking fixes to
existing functionality. If the final two patches are accepted
then I would plan to write patches to change all the other
commands to accept quoted filenames for arguments.
That would be my intention, but of course, this series should be
reviewed and accepted or rejected assuming the follow up work
never arrives.
Personally, I'm OK with that, we currently have two style of
filename passing. All I do in this series is acknoweldge that and
update the completion to handle it. Keeping a single filename
completion function (a) doesn't change the fact that we have two
filename argument styles, and (b) ensures that completion for one
type of argument will remain broken.
- I've restructured patches #1 and #2, I've tried to reduce the size
of patch #1, while patch #2 is a simple renaming patch.
- Patches #3 to #8 are largely unchanged from v3 -- minor tweaks to
accomodate changes in earlier patches only.
- Patches #9 onwards are new work.
- I think that there is additional refactoring and cleanup that
could be performed in the area of filename completion, but I've
resisted adding that to this series. How that cleanup would
progress would depend on whether I get all commands updated to
accept quoted filenames or not. I didn't want to invest a large
block of time assuming that I could get such a change into GDB
only to have it rejected. If we decide to keep the existing two
argumet style approach then I think there are other cleanups we
could potentially make in the future.
In V3:
- Patch #1 from the v2 series was merged.
- Remaining patches have been rebased and retested.
In V2:
- Patches #1 and #2 are new in this iteration. Patches #3 to #8 are
the patches from V1 rebased onto these two new patches,
- Patch #1 adds documentation for the formatting of filename
arguments, this tries to explain the two diffent ways that GDB
expects filename arguments to be formatted.
- Patch #2 addresses the problem that Lancelot pointed out: some
commands don't expect filename arguments to be quoted, or to
contain escapes. In this patch I split the filename completion in
two so the two different filename argument formats are handled
separately...
- This clears the way for the rest of the series, which updates how
completion works for those filename arguments that do accept
quoting and escaping,
- Patches #3 to #8 are in principle the same as in V1, but there
were some changes after rebasing onto the new patch #2.
Andrew Burgess (14):
gdb: split apart two different types of filename completion
gdb: deprecated filename_completer and associated functions
gdb: improve escaping when completing filenames
gdb: move display of completion results into completion_result class
gdb: simplify completion_result::print_matches
gdb: add match formatter mechanism for 'complete' command output
gdb: apply escaping to filenames in 'complete' results
gdb: improve gdb_rl_find_completion_word for quoted words
gdb: implement readline rl_directory_rewrite_hook callback
gdb: new extract_single_filename_arg helper function
gdb: extend completion of quoted filenames to work in brkchars phase
gdb: add remove-symbol-file command completion
gdb: allow quoted filenames for commands that have custom completion
gdb: 'target ...' commands now expect quoted/escaped filenames
gdb/NEWS | 21 +
gdb/auto-load.c | 4 +-
gdb/breakpoint.c | 4 +-
gdb/cli/cli-cmds.c | 35 +-
gdb/cli/cli-decode.c | 8 +-
gdb/cli/cli-dump.c | 6 +-
gdb/compile/compile.c | 11 +-
gdb/completer.c | 643 +++++++++++++++---
gdb/completer.h | 90 ++-
gdb/corefile.c | 3 +-
gdb/corelow.c | 24 +-
gdb/doc/gdb.texinfo | 19 +
gdb/dwarf2/index-write.c | 8 +-
gdb/exec.c | 12 +-
gdb/guile/scm-cmd.c | 2 +-
gdb/infcmd.c | 12 +-
gdb/inferior.c | 2 +-
gdb/jit.c | 2 +-
gdb/python/py-cmd.c | 2 +-
gdb/record-full.c | 4 +-
gdb/record.c | 2 +-
gdb/skip.c | 2 +-
gdb/source.c | 2 +-
gdb/symfile.c | 120 +++-
gdb/target-descriptions.c | 31 +-
gdb/testsuite/gdb.base/batch-exit-status.exp | 4 +-
.../gdb.base/filename-completion.exp | 319 +++++++--
gdb/testsuite/gdb.base/sym-file.exp | 258 +++----
gdb/testsuite/gdb.compile/compile.exp | 2 +-
gdb/testsuite/lib/gdb.exp | 10 +
gdb/tracectf.c | 12 +-
gdb/tracefile-tfile.c | 17 +-
gdb/utils.c | 18 +
gdb/utils.h | 14 +
34 files changed, 1329 insertions(+), 394 deletions(-)
base-commit: 2513312930b2b8a0b50fb681f2781372cce3c2f6
--
2.25.4
next prev parent reply other threads:[~2024-07-04 14:21 UTC|newest]
Thread overview: 104+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-29 11:42 [PATCH 0/6] " Andrew Burgess
2024-03-29 11:42 ` [PATCH 1/6] gdb: improve escaping when completing filenames Andrew Burgess
2024-03-30 23:48 ` Lancelot SIX
2024-03-29 11:42 ` [PATCH 2/6] gdb: move display of completion results into completion_result class Andrew Burgess
2024-03-29 12:14 ` Eli Zaretskii
2024-03-30 23:30 ` Lancelot SIX
2024-03-31 5:49 ` Eli Zaretskii
2024-04-12 17:24 ` Andrew Burgess
2024-04-12 18:42 ` Eli Zaretskii
2024-04-12 22:20 ` Andrew Burgess
2024-04-13 6:36 ` Eli Zaretskii
2024-04-13 9:09 ` Andrew Burgess
2024-04-13 9:46 ` Eli Zaretskii
2024-04-12 17:31 ` Andrew Burgess
2024-03-29 11:42 ` [PATCH 3/6] gdb: simplify completion_result::print_matches Andrew Burgess
2024-03-30 23:48 ` Lancelot SIX
2024-03-29 11:42 ` [PATCH 4/6] gdb: add match formatter mechanism for 'complete' command output Andrew Burgess
2024-03-30 23:49 ` Lancelot SIX
2024-03-31 5:55 ` Eli Zaretskii
2024-04-12 17:42 ` Andrew Burgess
2024-04-12 18:44 ` Eli Zaretskii
2024-04-12 22:29 ` Andrew Burgess
2024-04-13 6:39 ` Eli Zaretskii
2024-03-29 11:42 ` [PATCH 5/6] gdb: apply escaping to filenames in 'complete' results Andrew Burgess
2024-03-29 11:42 ` [PATCH 6/6] gdb: improve gdb_rl_find_completion_word for quoted words Andrew Burgess
2024-04-20 9:10 ` [PATCHv2 0/8] Further filename completion improvements Andrew Burgess
2024-04-20 9:10 ` [PATCHv2 1/8] gdb/doc: document how filename arguments are formatted Andrew Burgess
2024-04-20 9:44 ` Eli Zaretskii
2024-04-27 10:01 ` Andrew Burgess
2024-04-27 10:06 ` Eli Zaretskii
2024-04-29 9:10 ` Andrew Burgess
2024-04-20 9:10 ` [PATCHv2 2/8] gdb: split apart two different types of filename completion Andrew Burgess
2024-04-20 9:10 ` [PATCHv2 3/8] gdb: improve escaping when completing filenames Andrew Burgess
2024-04-20 9:10 ` [PATCHv2 4/8] gdb: move display of completion results into completion_result class Andrew Burgess
2024-04-20 9:10 ` [PATCHv2 5/8] gdb: simplify completion_result::print_matches Andrew Burgess
2024-04-20 9:10 ` [PATCHv2 6/8] gdb: add match formatter mechanism for 'complete' command output Andrew Burgess
2024-04-20 9:10 ` [PATCHv2 7/8] gdb: apply escaping to filenames in 'complete' results Andrew Burgess
2024-04-20 9:10 ` [PATCHv2 8/8] gdb: improve gdb_rl_find_completion_word for quoted words Andrew Burgess
2024-06-05 13:36 ` [PATCHv3 0/7] Further filename completion improvements Andrew Burgess
2024-06-05 13:36 ` [PATCHv3 1/7] gdb: split apart two different types of filename completion Andrew Burgess
2024-06-06 16:18 ` Tom Tromey
2024-06-17 13:05 ` Andrew Burgess
2024-06-05 13:36 ` [PATCHv3 2/7] gdb: improve escaping when completing filenames Andrew Burgess
2024-06-05 13:36 ` [PATCHv3 3/7] gdb: move display of completion results into completion_result class Andrew Burgess
2024-06-06 16:19 ` Tom Tromey
2024-06-05 13:36 ` [PATCHv3 4/7] gdb: simplify completion_result::print_matches Andrew Burgess
2024-06-05 13:36 ` [PATCHv3 5/7] gdb: add match formatter mechanism for 'complete' command output Andrew Burgess
2024-06-06 16:14 ` Tom Tromey
2024-06-17 13:29 ` Andrew Burgess
2024-06-05 13:36 ` [PATCHv3 6/7] gdb: apply escaping to filenames in 'complete' results Andrew Burgess
2024-06-05 13:36 ` [PATCHv3 7/7] gdb: improve gdb_rl_find_completion_word for quoted words Andrew Burgess
2024-06-06 16:24 ` [PATCHv3 0/7] Further filename completion improvements Tom Tromey
2024-07-04 14:20 ` Andrew Burgess [this message]
2024-07-04 14:20 ` [PATCHv4 01/14] gdb: split apart two different types of filename completion Andrew Burgess
2024-07-04 14:20 ` [PATCHv4 02/14] gdb: deprecated filename_completer and associated functions Andrew Burgess
2024-07-04 14:20 ` [PATCHv4 03/14] gdb: improve escaping when completing filenames Andrew Burgess
2024-07-04 14:20 ` [PATCHv4 04/14] gdb: move display of completion results into completion_result class Andrew Burgess
2024-07-04 14:21 ` [PATCHv4 05/14] gdb: simplify completion_result::print_matches Andrew Burgess
2024-07-04 14:21 ` [PATCHv4 06/14] gdb: add match formatter mechanism for 'complete' command output Andrew Burgess
2024-07-04 14:21 ` [PATCHv4 07/14] gdb: apply escaping to filenames in 'complete' results Andrew Burgess
2024-07-04 14:21 ` [PATCHv4 08/14] gdb: improve gdb_rl_find_completion_word for quoted words Andrew Burgess
2024-07-04 14:21 ` [PATCHv4 09/14] gdb: implement readline rl_directory_rewrite_hook callback Andrew Burgess
2024-07-04 14:21 ` [PATCHv4 10/14] gdb: new extract_single_filename_arg helper function Andrew Burgess
2024-07-04 14:21 ` [PATCHv4 11/14] gdb: extend completion of quoted filenames to work in brkchars phase Andrew Burgess
2024-07-04 14:21 ` [PATCHv4 12/14] gdb: add remove-symbol-file command completion Andrew Burgess
2024-07-04 15:38 ` Eli Zaretskii
2024-07-04 14:21 ` [PATCHv4 13/14] gdb: allow quoted filenames for commands that have custom completion Andrew Burgess
2024-07-04 15:42 ` Eli Zaretskii
2024-08-20 17:18 ` Andrew Burgess
2024-07-04 14:21 ` [PATCHv4 14/14] gdb: 'target ...' commands now expect quoted/escaped filenames Andrew Burgess
2024-07-04 15:34 ` Eli Zaretskii
2024-08-20 17:10 ` [PATCHv5 00/14] Further filename completion improvements Andrew Burgess
2024-08-20 17:10 ` [PATCHv5 01/14] gdb: split apart two different types of filename completion Andrew Burgess
2024-08-20 17:10 ` [PATCHv5 02/14] gdb: deprecated filename_completer and associated functions Andrew Burgess
2024-08-20 17:10 ` [PATCHv5 03/14] gdb: improve escaping when completing filenames Andrew Burgess
2024-08-20 17:10 ` [PATCHv5 04/14] gdb: move display of completion results into completion_result class Andrew Burgess
2024-08-20 17:10 ` [PATCHv5 05/14] gdb: simplify completion_result::print_matches Andrew Burgess
2024-08-20 17:10 ` [PATCHv5 06/14] gdb: add match formatter mechanism for 'complete' command output Andrew Burgess
2024-08-20 17:10 ` [PATCHv5 07/14] gdb: apply escaping to filenames in 'complete' results Andrew Burgess
2024-08-20 17:10 ` [PATCHv5 08/14] gdb: improve gdb_rl_find_completion_word for quoted words Andrew Burgess
2024-08-20 17:10 ` [PATCHv5 09/14] gdb: implement readline rl_directory_rewrite_hook callback Andrew Burgess
2024-08-20 17:10 ` [PATCHv5 10/14] gdb: new extract_single_filename_arg helper function Andrew Burgess
2024-08-20 17:10 ` [PATCHv5 11/14] gdb: extend completion of quoted filenames to work in brkchars phase Andrew Burgess
2024-08-20 17:10 ` [PATCHv5 12/14] gdb: add remove-symbol-file command completion Andrew Burgess
2024-08-20 18:46 ` Eli Zaretskii
2024-08-20 17:10 ` [PATCHv5 13/14] gdb: allow quoted filenames for commands that have custom completion Andrew Burgess
2024-08-20 18:47 ` Eli Zaretskii
2024-08-20 17:10 ` [PATCHv5 14/14] gdb: 'target ...' commands now expect quoted/escaped filenames Andrew Burgess
2024-08-30 11:33 ` [PATCHv6 00/14] Further filename completion improvements Andrew Burgess
2024-08-30 11:33 ` [PATCHv6 01/14] gdb: split apart two different types of filename completion Andrew Burgess
2024-08-30 11:33 ` [PATCHv6 02/14] gdb: deprecated filename_completer and associated functions Andrew Burgess
2024-08-30 11:33 ` [PATCHv6 03/14] gdb: improve escaping when completing filenames Andrew Burgess
2024-08-30 11:33 ` [PATCHv6 04/14] gdb: move display of completion results into completion_result class Andrew Burgess
2024-08-30 11:33 ` [PATCHv6 05/14] gdb: simplify completion_result::print_matches Andrew Burgess
2024-08-30 11:33 ` [PATCHv6 06/14] gdb: add match formatter mechanism for 'complete' command output Andrew Burgess
2024-08-30 11:33 ` [PATCHv6 07/14] gdb: apply escaping to filenames in 'complete' results Andrew Burgess
2024-08-30 11:33 ` [PATCHv6 08/14] gdb: improve gdb_rl_find_completion_word for quoted words Andrew Burgess
2024-08-30 11:33 ` [PATCHv6 09/14] gdb: implement readline rl_directory_rewrite_hook callback Andrew Burgess
2024-08-30 11:33 ` [PATCHv6 10/14] gdb: new extract_single_filename_arg helper function Andrew Burgess
2024-08-30 11:33 ` [PATCHv6 11/14] gdb: extend completion of quoted filenames to work in brkchars phase Andrew Burgess
2024-08-30 11:33 ` [PATCHv6 12/14] gdb: add remove-symbol-file command completion Andrew Burgess
2024-08-30 11:33 ` [PATCHv6 13/14] gdb: allow quoted filenames for commands that have custom completion Andrew Burgess
2024-08-30 11:33 ` [PATCHv6 14/14] gdb: 'target ...' commands now expect quoted/escaped filenames Andrew Burgess
2024-09-07 19:57 ` [PATCHv6 00/14] Further filename completion improvements Andrew Burgess
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=cover.1720101826.git.aburgess@redhat.com \
--to=aburgess@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