unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: "Mattias Engdegård" <mattias.engdegard@gmail.com>
To: "Gerd Möllmann" <gerd.moellmann@gmail.com>
Cc: 66575@debbugs.gnu.org
Subject: bug#66575: [PATCH] Gud lldb support
Date: Tue, 17 Oct 2023 11:00:35 +0200	[thread overview]
Message-ID: <19FFB7CA-6501-4E62-9EC6-D5F2DB680D70@gmail.com> (raw)
In-Reply-To: <m2edhuwtel.fsf@Mini.fritz.box>

16 okt. 2023 kl. 16.09 skrev Gerd Möllmann <gerd.moellmann@gmail.com>:

>> So what is the currently blessed way to communicate with LLDB?
> 
> Don't really know, I'm afraid.

Maybe it's worth a try anyway, since lldb-mi still seems maintained as a separate tool.
(But don't let it hold up your contribution -- it's useful on its own.)

>> If thñe file name can have an absolute directory part, then it may run
>> into trouble on Windows (C:\Some\Dir\File.c).
> 
> I guess I'll leave that as an exercise for someone having Windows :-).

I don't, but we could try to be nice anyway. What about replacing

  (group (1+ (not ":")))

with something like

  (group (opt (opt "\\\\?\\")         ; Windows fun
              (in "a-zA-Z") ":")      ; floppy letter
         (1+ (not ":")))

and ignore NTFS Alternate Data Streams, as we ignore the possibility of colons in file names on other systems?

Onto your most recent patch -- looks fine in general, only a few notes:

>  * Editing Changes in Emacs 30.1
>  
> ++++
> +** New command 'lldb'.

The text can be rearranged later on but this entry probably belongs under 'Changes in Specialized Modes and Packages'.

> +Run the LLDB debugger, analogous to the 'gud-gdb' command.  Note that
> +might want to add these settings to your .lldbinit file, to reduce the

Missing 'you' in the second sentence?

> +output in the LLDB output when stepping through source files.
> +
> +settings set stop-line-count-before 0
> +settings set stop-line-count-after 0

Indent these lines by 4 spaces (NEWS has its own formatting rules).

But shouldn't your new code issue these commands to lldb automatically? The user might not always run lldb under Emacs.

> +  ;; First line is the print command itself.
> +  (unless (string-match (regexp-quote (gud-tooltip-print-command ""))

Isn't this just (string-search ...) ? Or did you want a more precise match, in which case it probably should be anchored in some way and not just a substring search?

> +# This is for M-x lldb: don't show source lines when stopping.
> +settings set stop-line-count-before 0
> +settings set stop-line-count-after 0

As mentioned above, I'd hope we could do without this.






  reply	other threads:[~2023-10-17  9:00 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-16 12:00 bug#66575: [PATCH] Gud lldb support Gerd Möllmann
2023-10-16 13:30 ` Mattias Engdegård
2023-10-16 13:57   ` Mattias Engdegård
2023-10-16 14:46     ` Mattias Engdegård
2023-10-17  8:15       ` Gerd Möllmann
2023-10-16 14:09   ` Gerd Möllmann
2023-10-17  9:00     ` Mattias Engdegård [this message]
2023-10-17 10:03       ` Gerd Möllmann
2023-10-17 11:21         ` Mattias Engdegård
2023-10-17 12:30           ` Gerd Möllmann
2023-10-17 16:18             ` Mattias Engdegård
2023-10-17 16:55               ` Gerd Möllmann
2023-10-17 17:18                 ` Gerd Möllmann
2023-10-17 15:40           ` Gerd Möllmann
2023-10-17 16:27             ` Mattias Engdegård
2023-10-17 17:01               ` Gerd Möllmann

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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=19FFB7CA-6501-4E62-9EC6-D5F2DB680D70@gmail.com \
    --to=mattias.engdegard@gmail.com \
    --cc=66575@debbugs.gnu.org \
    --cc=gerd.moellmann@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.
Code repositories for project(s) associated with this public inbox

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

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).