This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Add tab completion for TUI's "focus" command
- From: Doug Evans <dje at google dot com>
- To: Patrick Palka <patrick at parcs dot ath dot cx>
- Cc: gdb-patches <gdb-patches at sourceware dot org>
- Date: Tue, 23 Jun 2015 09:54:23 -0500
- Subject: Re: [PATCH] Add tab completion for TUI's "focus" command
- Authentication-results: sourceware.org; auth=none
- References: <1434943800-9274-1-git-send-email-patrick at parcs dot ath dot cx> <CADPb22TmRqRwfEXgjJ3AzhLhWwAbQ0SmFwBO7hxQyteHmL7c9w at mail dot gmail dot com> <CA+C-WL_qFbrxEHrCH3huQPqSyE6wPOkGam8cfK1Lu0tVjxCpLw at mail dot gmail dot com>
On Tue, Jun 23, 2015 at 9:37 AM, Patrick Palka <patrick@parcs.ath.cx> wrote:
> On Tue, Jun 23, 2015 at 10:01 AM, Doug Evans <dje@google.com> wrote:
>> On Sun, Jun 21, 2015 at 10:30 PM, Patrick Palka <patrick@parcs.ath.cx> wrote:
>>> The implementation is pretty straightforward, though there's the
>>> question of what the completion list should show when the TUI has not
>>> yet been initalized.
>>
>> Hi.
>> What does "not yet been initialized" mean here?
>
> I mean that the user never switched to the TUI during the session, so
> the windows and stuff have not yet been created.
Thanks.
I tried "focus cmd" and "focus src" at the start of a gdb session and
they worked.
I also tried "focus asm" and got a complaint of an invalid window.
So I'd say sure, add cmd and src to the completion list
even if TUI isn't initialized, since the command will work
as expected. I'd add a comment to the code describing
why they're being unconditionally added.
Adding next and prev when TUI hasn't been initialized
are kinda the odd ones out, conceptually, but they
too "work" (so I'm not suggesting removing them).