> Basically, start GDB with Emacs as the executable to debug, then run > Emacs from GDB's command line. Oh well, I tried gdb /opt/emacs27/bin/emacs and I obtained Reading symbols from /opt/emacs27/bin/emacs...(no debugging symbols found)...done. But no emacs started. The message indicates that I should recompile emacs? > No need to google, the answer is under your fingertips: see the > beginning of the file etc/DEBUG in the Emacs source tree. Thanks, but just read it, but it is a bit confusing, since it is not clear to me whether I could start emacs first and then start gdb within emacs. So it comes down to this: is gdb /opt/emacs27/bin/emacs in the emacs/src directory the right command to use? I tried it but emacs does not start, what do I miss? So shall I recompile emacs with debug options like CFLAGS='-O0 -g3' ./configure --enable-checking='yes,glyphs' --enable-check-lisp-object-type