I am debugging why emacs crashes when using a function from a package1. The aim of this debug process is to get useful data to submit using M-x report-emacs-bug
.
To get help on how to debug emacs crashes, I have already looked at Emacs Manual - Crashing and Emacs Manual - After a Crash, but they did not help.
The After A Crash manual refers to emacs-buffer.gdb
but I have no idea how to use it. While asking google for help, I came across this emacs.SE question, and I recompiled emacs using the -ggdb3
flags.
I have no prior experience using gdb
and so I tried few failed attempts to use the emacs-buffer.gbd
file.
Here's what I tried:
gdb -x /path/to/emacs-buffer.gdb
gdb
->file /path/to/emacs-buffer.gdb
gdb
->source /path/to/emacs-buffer.gdb
source /path/to/emacs-buffer.gdb
On a side note, emacs compiled with the -ggdb3
flag takes about 10 seconds longer to load; earlier it was 5-6 seconds, now about 16-17 seconds. I know the exact seconds because of a code that calculates that in my init. Is this increase in startup time expected?
Footnote 1: emacs crashes consistently when undo-tree
tries to restore the undo history for a particular .org file (which I cannot share publicly). I have (setq undo-tree-auto-save-history t)
. This crash happens only on the emacs git master, not on emacs 24.5. On emacs 24.5, undo-tree
throws an error stating that it's unable to load the undo history (even through the undo history file exists), but at least the emacs session does not crash on that version.