unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Debugging Emacs with lldb
@ 2021-07-23 23:50 Yuan Fu
  2021-07-23 23:59 ` Alan Third
  0 siblings, 1 reply; 4+ messages in thread
From: Yuan Fu @ 2021-07-23 23:50 UTC (permalink / raw)
  To: emacs-devel, Alan Third

Hey Alan,

IIRC you are using lldb to debug Emacs. I’m stuck on a Mac and now need to debug Emacs, too. lldb doesn’t get any of the commands defined in gdbinit. How did you work around that? For example, how do you check the lisp backtrace without xbacktrace? Right now I’m staring at a wall of Ffuncall and don’t know what to do with it. TIA.

Yuan


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Debugging Emacs with lldb
  2021-07-23 23:50 Debugging Emacs with lldb Yuan Fu
@ 2021-07-23 23:59 ` Alan Third
  2021-07-24  0:34   ` Yuan Fu
  0 siblings, 1 reply; 4+ messages in thread
From: Alan Third @ 2021-07-23 23:59 UTC (permalink / raw)
  To: Yuan Fu; +Cc: emacs-devel

On Fri, Jul 23, 2021 at 07:50:21PM -0400, Yuan Fu wrote:
> Hey Alan,
> 
> IIRC you are using lldb to debug Emacs. I’m stuck on a Mac and now
> need to debug Emacs, too. lldb doesn’t get any of the commands
> defined in gdbinit. How did you work around that? For example, how
> do you check the lisp backtrace without xbacktrace? Right now I’m
> staring at a wall of Ffuncall and don’t know what to do with it.
> TIA.

I don't do much lisp work, so I've never really run up against these
problems.

If you can get GDB installed it should be possible to sign it so it
works. At least it used to be possible to do so. There are
instructions on the internet, but I won't recommend any particular
ones as I haven't done it for years.

-- 
Alan Third



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Debugging Emacs with lldb
  2021-07-23 23:59 ` Alan Third
@ 2021-07-24  0:34   ` Yuan Fu
  2021-07-24  6:18     ` Eli Zaretskii
  0 siblings, 1 reply; 4+ messages in thread
From: Yuan Fu @ 2021-07-24  0:34 UTC (permalink / raw)
  To: Alan Third; +Cc: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 1172 bytes --]



> On Jul 23, 2021, at 7:59 PM, Alan Third <alan@idiocy.org> wrote:
> 
> On Fri, Jul 23, 2021 at 07:50:21PM -0400, Yuan Fu wrote:
>> Hey Alan,
>> 
>> IIRC you are using lldb to debug Emacs. I’m stuck on a Mac and now
>> need to debug Emacs, too. lldb doesn’t get any of the commands
>> defined in gdbinit. How did you work around that? For example, how
>> do you check the lisp backtrace without xbacktrace? Right now I’m
>> staring at a wall of Ffuncall and don’t know what to do with it.
>> TIA.
> 
> I don't do much lisp work, so I've never really run up against these
> problems.
> 
> If you can get GDB installed it should be possible to sign it so it
> works. At least it used to be possible to do so. There are
> instructions on the internet, but I won't recommend any particular
> ones as I haven't done it for years.

I’ve tried countless times since 2019, and I can install and code sign GDB, but every time I “run”, gdb hangs. That seems to be a bug that was yet to be fixed[1]. 

Anyway, thanks!

[1]: https://sourceware.org/bugzilla/show_bug.cgi?id=24069 <https://sourceware.org/bugzilla/show_bug.cgi?id=24069>

Yuan

[-- Attachment #2: Type: text/html, Size: 1996 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Debugging Emacs with lldb
  2021-07-24  0:34   ` Yuan Fu
@ 2021-07-24  6:18     ` Eli Zaretskii
  0 siblings, 0 replies; 4+ messages in thread
From: Eli Zaretskii @ 2021-07-24  6:18 UTC (permalink / raw)
  To: Yuan Fu; +Cc: alan, emacs-devel

> From: Yuan Fu <casouri@gmail.com>
> Date: Fri, 23 Jul 2021 20:34:47 -0400
> Cc: emacs-devel <emacs-devel@gnu.org>
> 
>  If you can get GDB installed it should be possible to sign it so it
>  works. At least it used to be possible to do so. There are
>  instructions on the internet, but I won't recommend any particular
>  ones as I haven't done it for years.
> 
> I’ve tried countless times since 2019, and I can install and code sign GDB, but every time I “run”, gdb hangs.
> That seems to be a bug that was yet to be fixed[1]. 

Please try the latest pretest of GDB 11, I think something was done
there about that.  The NEWS file says:

  * Configure changes

  --enable-codesign=CERT
    This can be used to invoke "codesign -s CERT" after building gdb.
    This option is useful on macOS, where code signing is required for
    gdb to work properly.

I don't use macOS, so have no idea what that means in practice, but
perhaps you and Alan will.

In general, I suggest to invest any effort required to have GDB
running on your system, it is very hard to debug Emacs without having
GDB (you need to type the expansion of every .gdbinit command by hand
each time, and some of them won't work at all).



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-07-24  6:18 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-23 23:50 Debugging Emacs with lldb Yuan Fu
2021-07-23 23:59 ` Alan Third
2021-07-24  0:34   ` Yuan Fu
2021-07-24  6:18     ` Eli Zaretskii

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