all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Gerd Möllmann" <gerd.moellmann@gmail.com>
To: "Mattias Engdegård" <mattias.engdegard@gmail.com>
Cc: 66575@debbugs.gnu.org
Subject: bug#66575: [PATCH] Gud lldb support
Date: Tue, 17 Oct 2023 14:30:41 +0200	[thread overview]
Message-ID: <m2bkcxph1q.fsf@Pro.fritz.box> (raw)
In-Reply-To: <76E471C3-4926-4B71-B945-0C87BB04B0CD@gmail.com> ("Mattias Engdegård"'s message of "Tue, 17 Oct 2023 13:21:41 +0200")

Mattias Engdegård <mattias.engdegard@gmail.com> writes:

> 17 okt. 2023 kl. 12.03 skrev Gerd Möllmann <gerd.moellmann@gmail.com>:
>
>> Hm.  I'd rather see someone run lldb on Windows, and tell us if it even
>> prints absolute file names.  It doesn't seem to do that on macOS.
>
> So it seems. Odd. All right, let's use the simple pattern for now.
> But doesn't this severely limit the ability of Emacs to locate the source file?
> Surely there must be a way to retrieve the directory?

There is this: https://lldb.llvm.org/use/formatting.html

TLDR is that one can customize what LLDB prints in certain situations.
The default is, AFAIU, and I'm not an LLDB expert at all, relative
paths.

>> I've thought about doing that as an initialization, but then it would
>> have to be manually undone once lldb is running, since .lldbinit is
>> loaded first, AFAIK, if enabled (default = no), which one could
>> suppress and load it later, but that might also not be what the user
>> wants. And so on...
>
> Would you please explain this slowly to someone who's even less alert.
> than usual this morning?

Sorry :-)

> I got as far as understanding that the commands turn off the emission
> of source lines around the stopping position.

Correct.

> Fine, and this is in
> general what we want if the source position is shown in an Emacs
> window.

At least that's what I find prettier, so I added my (our) personal
preferences to src/.lldbinit :-).

I didn't want to forsee what users want, that's all.

In general, I find it always surprising what scenarios users come up
with, and I dont't want to get into anyone's way.  You get from LLDB
what you configure for LLDB.

> But the user may have fine reasons for wanting to run lldb
> outside Emacs from time to time, and would then probably prefer the
> source lines in that case.

Could be, yes.  In that case they could use different init files, or
different LLDB config files, or write some Python (INSIDE_EMACS should
be in the environment when in Emacs), or...

> (Besides, I often don't see the position being tracked in a source
> buffer with your patch. Is this a matter of missing directory in the
> stop text?)

Can you give me an example that I can try to reproduce?  LLDB version
and output in these cases would be also be interesting.  I'm using
17.0.2 here on macOS 14.0.

> And here's a completely unrelated problem: the lldb command-line
> provides tab-completion on which I rely a lot as the command set is
> vast and my knowledge of it is spotty.

You're describing my situation :-).

> Could it be provided in Emacs?

Possibly.  Indeed, I've started looking at this, see etc/emacs_lldb.py,
function xcomplete, but I'm not there yet, because I don't fully
understand what the Python API used there guarantees to return, and the
documentation is silent, as usual.  (Although it did get better in many
areas recently, I have to admit.)

So, I'm either left with guessing, or looking at the C++ sources.
Anyway--chances are that I either find out, or pretend to have found out
at some point :-).

That would then come after the current stuff is committed, of course.





  reply	other threads:[~2023-10-17 12:30 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
2023-10-17 10:03       ` Gerd Möllmann
2023-10-17 11:21         ` Mattias Engdegård
2023-10-17 12:30           ` Gerd Möllmann [this message]
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

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

  git send-email \
    --in-reply-to=m2bkcxph1q.fsf@Pro.fritz.box \
    --to=gerd.moellmann@gmail.com \
    --cc=66575@debbugs.gnu.org \
    --cc=mattias.engdegard@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 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.