> > This is your "Debugging Emacs 101", lesson 1: > > A breakpoint in Fsignal is frequently hit because some error is thrown > which Emacs will catch and ignore, but the debugger gets to see it > first. To see whether this is the signal you are after (if you don't > already know), do this: > > (gdb) p error_symbol > (gdb) xsymbol > > The last command should display the Lisp name of the signal. Crystal > ball here says you will see "void-variable", which is not the signal > you want. So now make the breakpoint conditional: > > (gdb) condition 3 error_symbol != 41328 > (gdb) c > > and see what other signal is thrown. I had a couple of other > unrelated signals (which happened once each, so I didn't feel like > making the condition more complex), and finally you will get your > expected "end-of-file" error. Then look around; the Lisp backtrace > should be the first thing to look at. > Thanks for that quick intro to setting conditional breakpoints. I did (gdb) condition 3 error_symbol!= && error_symbol!= && .. and looks like that worked. But it looks like I have a different backtrace than the one you got. (gdb) p error_symbol $3 = 49824 (gdb) xsymbol $4 = (struct Lisp_Symbol *) 0xc87bd0 "void-variable" (gdb) condition 3 error_symbol!=41328 && error_symbol!=49824 (gdb) c Continuing. Breakpoint 3, Fsignal (error_symbol=19056, data=16197139) at eval.c:1471 1471 = (NILP (error_symbol) ? Fcar (data) : error_symbol); (gdb) p error_symbol $5 = 19056 (gdb) xsymbol $6 = (struct Lisp_Symbol *) 0xc803a0 "error" (gdb) bt #0 Fsignal (error_symbol=19056, data=16197139) at eval.c:1471 #1 0x00000000005f631a in Ffuncall (nargs=3, args=0x7fffffff6430) at eval.c:2696 #2 0x000000000063c073 in exec_byte_code (bytestr=9618644, vector=9618677, maxdepth=26, args_template=514, nargs=2, args=0x7fffffff6970) at bytecode.c:880 #3 0x00000000005f6b6c in funcall_lambda (fun=9618597, nargs=2, arg_vector=0x7fffffff6970) at eval.c:2855 #4 0x00000000005f6568 in Ffuncall (nargs=3, args=0x7fffffff6968) at eval.c:2742 #5 0x000000000063c073 in exec_byte_code (bytestr=26216724, vector=26182181, maxdepth=18, args_template=0, nargs=0, args=0x0) at bytecode.c:880 #6 0x00000000005f6ea8 in funcall_lambda (fun=26182285, nargs=2, arg_vector=0x18f8225) at eval.c:2921 #7 0x00000000005f6568 in Ffuncall (nargs=3, args=0x7fffffff6e98) at eval.c:2742 #8 0x000000000063c073 in exec_byte_code (bytestr=26203300, vector=26180981, maxdepth=22, args_template=0, nargs=0, args=0x0) at bytecode.c:880 #9 0x00000000005f6ea8 in funcall_lambda (fun=26181189, nargs=1, arg_vector=0x18f7d75) at eval.c:2921 #10 0x00000000005f6568 in Ffuncall (nargs=2, args=0x7fffffff73d8) at eval.c:2742 #11 0x000000000063c073 in exec_byte_code (bytestr=25712436, vector=20655013, maxdepth=26, args_template=1026, nargs=1, args=0x7fffffff7918) at bytecode.c:880 #12 0x00000000005f6b6c in funcall_lambda (fun=24354509, nargs=1, arg_vector=0x7fffffff7910) at eval.c:2855 #13 0x00000000005f6568 in Ffuncall (nargs=2, args=0x7fffffff7908) at eval.c:2742 #14 0x000000000063c073 in exec_byte_code (bytestr=17397476, vector=21453909, maxdepth=10, args_template=2, nargs=0, args=0x7fffffff7e40) at bytecode.c:880 #15 0x00000000005f6b6c in funcall_lambda (fun=20671589, nargs=0, arg_vector=0x7fffffff7e40) at eval.c:2855 #16 0x00000000005f6568 in Ffuncall (nargs=1, args=0x7fffffff7e38) at eval.c:2742 #17 0x000000000063c073 in exec_byte_code (bytestr=14902196, vector=21523493, maxdepth=22, args_template=1026, nargs=1, args=0x7fffffff8448) at bytecode.c:880 #18 0x00000000005f6b6c in funcall_lambda (fun=21523645, nargs=1, arg_vector=0x7fffffff8440) at eval.c:2855 #19 0x00000000005f6568 in Ffuncall (nargs=2, args=0x7fffffff8438) at eval.c:2742 #20 0x00000000005ee638 in Ffuncall_interactively (nargs=2, args=0x7fffffff8438) at callint.c:252 #21 0x00000000005f61e8 in Ffuncall (nargs=3, args=0x7fffffff8430) at eval.c:2673 #22 0x00000000005f09be in Fcall_interactively (function=5444288, record_flag=5289200, keys=13400757) at callint.c:840 #23 0x00000000005f6355 in Ffuncall (nargs=4, args=0x7fffffff8758) at eval.c:2700 #24 0x000000000063c073 in exec_byte_code (bytestr=10409484, vector=10409517, maxdepth=54, args_template=4102, nargs=2, args=0x7fffffff8cd8) at bytecode.c:880 #25 0x00000000005f6b6c in funcall_lambda (fun=10409437, nargs=2, arg_vector=0x7fffffff8cc8) at eval.c:2855 #26 0x00000000005f6568 in Ffuncall (nargs=3, args=0x7fffffff8cc0) at eval.c:2742 #27 0x000000000063c073 in exec_byte_code (bytestr=10408684, vector=10408717, maxdepth=62, args_template=3078, nargs=3, args=0x7fffffff9318) at bytecode.c:880 #28 0x00000000005f6b6c in funcall_lambda (fun=10408629, nargs=3, arg_vector=0x7fffffff9300) at eval.c:2855 #29 0x00000000005f6568 in Ffuncall (nargs=4, args=0x7fffffff92f8) at eval.c:2742 #30 0x00000000005ee638 in Ffuncall_interactively (nargs=4, args=0x7fffffff92f8) at callint.c:252 #31 0x00000000005f61e8 in Ffuncall (nargs=5, args=0x7fffffff92f0) at eval.c:2673 #32 0x00000000005f576f in Fapply (nargs=3, args=0x7fffffff93e0) at eval.c:2321 #33 0x00000000005eeab0 in Fcall_interactively (function=560928, record_flag=0, keys=13400757) at callint.c:389 #34 0x00000000005f6355 in Ffuncall (nargs=4, args=0x7fffffff9668) at eval.c:2700 #35 0x000000000063c073 in exec_byte_code (bytestr=10409484, vector=10409517, maxdepth=54, args_template=4102, nargs=1, args=0x7fffffff9bc0) at bytecode.c:880 #36 0x00000000005f6b6c in funcall_lambda (fun=10409437, nargs=1, arg_vector=0x7fffffff9bb8) at eval.c:2855 #37 0x00000000005f6568 in Ffuncall (nargs=2, args=0x7fffffff9bb0) at eval.c:2742 #38 0x00000000005f5d10 in call1 (fn=14784, arg1=560928) at eval.c:2552 #39 0x000000000055ac58 in command_loop_1 () at keyboard.c:1471 #40 0x00000000005f2f86 in internal_condition_case (bfun=0x55a49f , handlers=19056, hfun=0x559c89 ) at eval.c:1309 #41 0x000000000055a1a7 in command_loop_2 (ignore=0) at keyboard.c:1099 #42 0x00000000005f28a6 in internal_catch (tag=46224, func=0x55a17e , arg=0) at eval.c:1074 #43 0x000000000055a147 in command_loop () at keyboard.c:1078 #44 0x0000000000559858 in recursive_edit_1 () at keyboard.c:684 #45 0x00000000005599eb in Frecursive_edit () at keyboard.c:755 #46 0x00000000005578aa in main (argc=2, argv=0x7fffffffa068) at emacs.c:1606 Lisp Backtrace: "signal" (0xffff6438) "error" (0xffff6970) "epg-check-configuration" (0xffff6ea0) "epg-find-configuration" (0xffff73e0) "package-refresh-contents" (0xffff7910) "package-menu-refresh" (0xffff7e40) "list-packages" (0xffff8440) "funcall-interactively" (0xffff8438) "call-interactively" (0xffff8760) "command-execute" (0xffff8cc8) "execute-extended-command" (0xffff9300) "funcall-interactively" (0xffff92f8) "call-interactively" (0xffff9670) "command-execute" (0xffff9bb8) (gdb) -- -- Kaushal Modi