emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Added support for debugging emacs daemon


From: Michael Welsh Duggan
Subject: Added support for debugging emacs daemon
Date: Tue, 12 Feb 2019 10:44:01 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

I was recently in a position where I wanted to run "emacs --daemon"
under gdb.  After a few fumbles, I hit upon the following. I suggest
either adding this or something like this to .gdbinit or mentioning it
in DEBUG:

  # Follow forks until any possible daemonization is over
  set follow-fork-mode child
  tbreak init_signals
  commands
    set follow-fork-mode parent
  end

Mind you, init_signals is only used since it is the first emacs function
called after daemonization currently.  If things were to be moved
around, this snippet would have to change.

-- 
Michael Welsh Duggan
(address@hidden)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]