I assume this is coming from a Vim plugin, but I get no leads on where to look. What's the best way of debugging it?
Vim: Caught deadly signal SEGV
Vim: Finished.
[1] 8119 segmentation fault
Vi and Vim Stack Exchange is a question and answer site for people using the vi and Vim families of text editors. It only takes a minute to sign up.
Sign up to join this communityThis has been here for four hours, I'll give you what help I can. The classical way of debugging programs is with gdb
:
$ ulimit -c unlimited
$ # [do whatever generates the segmentation fault]
$ ls -ld *core* # see new core file that I'll call $core
$ file $core # see program name that I'll call $program
$ gdb $program $core
(gdb) bt
That should hopefully give a backtrace of function calls. If you're unlucky you'll get lots of ??, which means that debugging symbols are not enabled. You could get around that with access to the original program objects, but I don't suppose you'd have those.
Instead, one might also run
$ gdb $program
(gdb) run arg1 arg2 argetc
However my experience with this is almost only with non-UI programs. I have no idea if either method will work when the segmentation fault happens inside a vim plugin . . .
gdb
would be a valid approach. I guess I was thinking that plugins would need something more specific. Has anyone else used gdb
to debug Vim plugins?
– Sauce McBoss
Apr 11 '16 at 1:27
catchsegv program
to find why it is segfaulting.
– Christian Brabandt
Jul 21 '16 at 19:30
:h debug-mode
. – statox Apr 11 '16 at 11:57