6104 comments
2357 subscribers
6264 on Twitter
Subscribe! Feed reader E-mail

Debugging Emacs hangs

Run emacs in gdb, preferably from the src directory where you compiled emacs:

   $ cd ~/emacs-build/src
   $ gdb ./emacs

[There's a special .gdbinit file in that directory that defines handy emacs
debugging commands.]

When it hangs, hit C-z or something to exit to the debugger (you can’t use
C-c like usual when debugging emacs, because emacs’ standard .gdbinit file
changes gdb’s SIGINT handling to make C-g work properly on ttys).

Then look at a C backtrace (“backtrace”) and lisp backtrace (“xbacktrace”)
to see what’s up.

For more fun, do the above from another emacs session using emacs’ `M-x gdb’
command.

E-Mail from Miles Bader

Short URL: http://sachachua.com/blog/p/2066

On This Day...

  • 2013: Emacs Chat: Bastien Guerry — In this chat, Bastien tells stories about getting started in Emacs, reading his mail/news/blogs in Gnus, and hacking his life [...]
  • 2012: Planning my life — I often think about what I want in life. What do I want to learn? What do I want to [...]
  • 2011: Waiting for my Kindle — I’m waiting for the delivery of my Kindle. Well, I’m not really waiting for it. I’m waiting for my co-worker [...]
  • 2011: Travel updates: GPS, Pearl Street, Vibram toe shoes — From Thursday evening: Success! I spent late afternoon and evening wandering around Pearl Street Mall and thereabouts in Boulder, Colorado. I [...]
  • 2010: Thinking about the path ahead — Yes, I know, I said I wasn’t going to overthink this career thing. During a bike ride to work, [...]
  • 2007: At the airport — The din of the airport fades into the background, the white noise of hushed conversations in a hundred languages and suitcases [...]
  • 2006: Schadenfreude — schadenfreude: pleasure taken from someone else’s misfortune It’s always nice to know that I have friends who read my blog and [...]
  • 2004: Bookpool — Allan T. Moster thinks that Bookpool is cool. Said shipping was free. Not sure if that applies to the Philippines. Head-First Java [...]
  • 2004: A Poor-Aunt Story — Haruki Murakami Wonderful, thought-provoking story. I’m beginning to see why people like Murakami. ¶ÁÊé – A POOR-AUNT STORY by HARUKI MURAKAMI
  • 2004: Emacs-wiki documentation in Japanese — http://www-aos.eps.s.u-tokyo.ac.jp/~takagi/EmacsWiki.html

Get the highlights as a PDF!

Stories from my Twenties: Highlights from a Decade of Blogging

Free sample!