public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Tom Tromey <tom@tromey.com>
To: Simon Farre via Gdb-patches <gdb-patches@sourceware.org>
Cc: Simon Farre <simon.farre.cx@gmail.com>
Subject: Re: [PATCH v1] gdb/DAP - Add completionsRequest
Date: Mon, 03 Jul 2023 13:11:59 -0600	[thread overview]
Message-ID: <874jmkx11c.fsf@tromey.com> (raw)
In-Reply-To: <20230628162616.102268-1-simon.farre.cx@gmail.com> (Simon Farre via Gdb-patches's message of "Wed, 28 Jun 2023 18:26:16 +0200")

>>>>> "Simon" == Simon Farre via Gdb-patches <gdb-patches@sourceware.org> writes:

Simon> Self-explanatory.

I think it's preferable to write something anyway.

Simon> +
Simon> +def _completions(text: str, column: int, line: Optional[int], frameId: Optional[int]):

This should be marked @in_gdb_thread.

Since 'line' isn't used, I think it can just be removed here and also
from 'completions' itself, as it is optional anyway.

Shouldn't 'column' be used?  Like perhaps the text should be truncated
at the given column.  (It's also fine to do this work in the main
thread.)

Simon> +def completions(
Simon> +    *,
Simon> +    text: str,
Simon> +    column: int,
Simon> +    line: Optional[int] = None,
Simon> +    frameId: Optional[int] = None,

I notice that frameId doesn't do anything either.  Since it's optional,
I suppose it could just be dropped here.  gdb doesn't really have this
concept, though we did add it for expression evaluation to support DAP,
so maybe it should also be added for completion.

Tom

  parent reply	other threads:[~2023-07-03 19:12 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-28 16:26 Simon Farre
2023-06-29  8:33 ` Lancelot SIX
2023-06-29 12:01   ` Simon Farre
2023-07-03 19:11 ` Tom Tromey [this message]
2023-07-05 14:02   ` Simon Farre
2023-07-06 15:16     ` Tom Tromey

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=874jmkx11c.fsf@tromey.com \
    --to=tom@tromey.com \
    --cc=gdb-patches@sourceware.org \
    --cc=simon.farre.cx@gmail.com \
    /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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).