all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "João Távora" <joaotavora@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: daniel@dpettersson.net, philipk@posteo.net, dmitry@gutov.dev,
	 john@yates-sheets.org, krister.schuchardt@gmail.com,
	adam@alphapapa.net,  emacs-devel@gnu.org
Subject: Re: [ELPA] New package: dape
Date: Wed, 6 Dec 2023 13:38:54 +0000	[thread overview]
Message-ID: <CALDnm50c6SrmVtwLcX8bbQemFXk8AfvjY0zN0MyW3mHtQwUctg@mail.gmail.com> (raw)
In-Reply-To: <83bkb34gx1.fsf@gnu.org>

On Wed, Dec 6, 2023 at 1:08 PM Eli Zaretskii <eliz@gnu.org> wrote:
>
> > From: João Távora <joaotavora@gmail.com>
> > Date: Wed, 6 Dec 2023 12:56:12 +0000
> > Cc: Daniel Pettersson <daniel@dpettersson.net>,
> >  "Philip K." <philipk@posteo.net>,
> >  Dmitry Gutov <dmitry@gutov.dev>, John Yates <john@yates-sheets.org>,
> >  Krister Schuchardt <krister.schuchardt@gmail.com>,
> >  Adam Porter <adam@alphapapa.net>, emacs-devel <emacs-devel@gnu.org>
> >
> > I think what you're missing is that the support is the other way round. I'm recent versions of GDB you
> > can talk to it via DAP.
>
> Why would we want to do that in Emacs, when we already have gdb-mi?

Noone proposed that, AFAIU.  But that's what DAP support in GDB is
and that's what you asked about.

As to "why we would want"... No idea... But imagine that dape.el ends
up supporting a much nicer UI than gdb-mi.el?  More responsive,
robust, great keybindings, etc.  Than I imagine some people would
want to talk to GDB using that UI instead of gdb-mi.el's.

> > But that doesn't help when reusing the UI of gdb-mi.el to talk to non-gdb DAP debuggers.
>
> Like what?

Like a lot of non-GDB debuggers these days talk DAP.  Here's a
big list: https://microsoft.github.io/debug-adapter-protocol/implementors/adapters/

> > And that
> > interface reuse (which would be a great thing if it were particle and clean, granted) is what Daniel is
> > presumably trying to achieve.
>
> gdb-mi is explicitly meant to be used with the GDB/MI interface, not
> with anything else.  It makes little sense with other interpreters.
> The only part that could be theoretically extracted is the setup of
> several debugging-related windows, but doing that from scratch should
> be a very simple task, and there's nothing in gdb-mi that AFAICT is
> unique in those few portions.  Moreover, I won't be surprised if some
> UI decisions in gdb-mi were not made specifically to cater to G|DB and
> its MI protocol.
>
> IOW, I don't see why someone would want to reuse gdb-mi's code if we
> only need to reuse the few UI parts of it.  It sounds like more
> trouble than worth it.

I don't know gdb-mi.el very well, but if it has code for displaying
and interacting with lists of threads, local variables, registers,
breakpoints, displaying assembly, then IMO it could well make sense
to lift that interface to something that both gdb-mi.el and dape.el
could use.  That's less code for us to maintain and potential
improvements to that liften code would benefit both extensions.

As you know, Eglot uses this approach: it tries to add as little UI
as possible and reuse existing things in Emacs.  Frequently I end up
doing work to generalize these existing components in
backward-compatible fashion for that effect.   Which is not always,
because sometimes it's not an easy job.

I personally wouldn't write it off as "more trouble than it's
worth", without a more or less thorough analysis of the similarities
and differences between these UIs.  Cost-benefit analysis are
usually hard questions to answer.

João



  reply	other threads:[~2023-12-06 13:38 UTC|newest]

Thread overview: 49+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-13 10:35 [ELPA] New package: dape Daniel Pettersson
2023-10-13 12:24 ` Philip Kaludercic
2023-10-14 12:28   ` Daniel Pettersson
2023-10-14 14:54     ` Philip Kaludercic
2023-10-15 13:50       ` James Thomas
2023-10-15 14:12         ` Philip Kaludercic
2023-10-15 17:24           ` John Yates
2023-10-18 21:54       ` Daniel Pettersson
2023-10-19  2:08         ` Adam Porter
2023-10-19 10:52           ` Krister Schuchardt
2023-10-19 11:06             ` Dmitry Gutov
2023-10-20 14:53               ` John Yates
2023-11-01 19:13                 ` Dmitry Gutov
2023-11-02 14:42                   ` João Távora
2023-11-04  9:51                     ` Daniel Pettersson
2023-11-04 10:00                       ` Philip Kaludercic
2023-11-23  6:10                         ` Philip Kaludercic
2023-12-05  8:41                           ` Philip Kaludercic
2023-12-05  9:18                             ` João Távora
2023-12-05 10:59                               ` Philip Kaludercic
2023-12-05 11:29                                 ` João Távora
2023-12-06  3:57                                   ` Richard Stallman
2023-12-06 10:09                                   ` Daniel Pettersson
2023-12-06 12:30                                     ` Eli Zaretskii
2023-12-06 12:56                                       ` João Távora
2023-12-06 13:08                                         ` Eli Zaretskii
2023-12-06 13:38                                           ` João Távora [this message]
2023-12-06 17:00                                             ` Eli Zaretskii
2023-12-06 23:03                                               ` João Távora
2023-12-06 23:55                                               ` Daniel Pettersson
2023-12-07  7:13                                                 ` Eli Zaretskii
2023-11-04 13:46                       ` Adam Porter
2023-11-04 14:01                         ` Eli Zaretskii
2023-11-04 14:24                           ` Philip Kaludercic
2023-11-04 15:06                             ` Adam Porter
2023-11-04 15:27                               ` Philip Kaludercic
2023-11-04 14:53                           ` Adam Porter
2023-11-04 15:14                             ` Eli Zaretskii
2023-11-04 19:15                               ` Adam Porter
2023-11-04 23:21                       ` João Távora
2023-11-07 10:19                         ` Daniel Pettersson
2023-11-07 10:40                           ` João Távora
2023-11-08  8:31                             ` Daniel Pettersson
2023-10-19 15:12         ` Philip Kaludercic
2023-10-19 17:50         ` Björn Bidar
2023-11-01 16:50         ` Philip Kaludercic
2023-10-15 13:55 ` Mauro Aranda
2023-10-17 20:39   ` Daniel Pettersson
2023-10-20  5:49 ` Milan Glacier

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=CALDnm50c6SrmVtwLcX8bbQemFXk8AfvjY0zN0MyW3mHtQwUctg@mail.gmail.com \
    --to=joaotavora@gmail.com \
    --cc=adam@alphapapa.net \
    --cc=daniel@dpettersson.net \
    --cc=dmitry@gutov.dev \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=john@yates-sheets.org \
    --cc=krister.schuchardt@gmail.com \
    --cc=philipk@posteo.net \
    /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.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.