Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Simon Farre via Gdb-patches <gdb-patches@sourceware.org>
To: Tom Tromey <tom@tromey.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH v1] gdb/DAP - Add completionsRequest
Date: Wed, 5 Jul 2023 16:02:02 +0200	[thread overview]
Message-ID: <79d036ac-81f5-ee9b-233c-0b2f6f5a0f11@gmail.com> (raw)
In-Reply-To: <874jmkx11c.fsf@tromey.com>


> I think it's preferable to write something anyway.
I'll update next patch with descriptive commit message.
>
> 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.

Right, I added it to make it look 1-to-1 with the DAP spec, _even 
though_ we don't actually use them in GDB,
as I find this approach less confusing - if a GDB contributor (or user) 
were to look up the signature, then look at the DAP spec
and not see the same things. But I'll remove the things that doesn't 
make sense, as it were, in GDB-land in the next patch.

> 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.)
I tried doing that, and no matter how or what I did, VSCode ended up 
just vomitting out the wrong result. I'm not sure
if that's an error I made or VSCode not being exactly compliant with the 
spec. This patch was the one that finally made
the request work in VSCode. I'll have another look at it though.

Thanks!

  reply	other threads:[~2023-07-05 14:02 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-28 16:26 Simon Farre via Gdb-patches
2023-06-29  8:33 ` Lancelot SIX via Gdb-patches
2023-06-29 12:01   ` Simon Farre via Gdb-patches
2023-07-03 19:11 ` Tom Tromey
2023-07-05 14:02   ` Simon Farre via Gdb-patches [this message]
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=79d036ac-81f5-ee9b-233c-0b2f6f5a0f11@gmail.com \
    --to=gdb-patches@sourceware.org \
    --cc=simon.farre.cx@gmail.com \
    --cc=tom@tromey.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