Mercurial > vim
comparison runtime/doc/debug.txt @ 502:52e76e2b5b65 v7.0140
updated for version 7.0140
author | vimboss |
---|---|
date | Thu, 01 Sep 2005 20:46:49 +0000 |
parents | |
children | aa08661abaf7 |
comparison
equal
deleted
inserted
replaced
501:ce2181d14aa0 | 502:52e76e2b5b65 |
---|---|
1 *debug.txt* For Vim version 7.0aa. Last change: 2005 Sep 01 | |
2 | |
3 | |
4 VIM REFERENCE MANUAL by Bram Moolenaar | |
5 | |
6 | |
7 Debugging Vim *debug-vim* | |
8 | |
9 This is for debugging Vim itself, when it doesn't work properly. | |
10 | |
11 1. Location of a crash, using gcc and gdb |debug-gcc| | |
12 2. Windows Bug Reporting |debug-win32| | |
13 | |
14 ============================================================================== | |
15 | |
16 1. Location of a crash, using gcc and gdb *debug-gcc* | |
17 | |
18 When Vim crashes in one of the test files, and you are using gcc for | |
19 compilation, here is what you can do to find out exactly where Vim crashes. | |
20 This also applies when using the MingW tools. | |
21 | |
22 1. Compile Vim with the "-g" option (there is a line in the Makefile for this, | |
23 which you can uncomment). | |
24 | |
25 2. Execute these commands (replace "11" with the test that fails): > | |
26 cd testdir | |
27 gdb ../vim | |
28 run -u unix.vim -U NONE -s dotest.in test11.in | |
29 | |
30 3. Check where Vim crashes, gdb should give a message for this. | |
31 | |
32 4. Get a stack trace from gdb with this command: > | |
33 where | |
34 < You can check out different places in the stack trace with: > | |
35 frame 3 | |
36 < Replace "3" with one of the numbers in the stack trace. | |
37 | |
38 ============================================================================== | |
39 | |
40 2. Windows Bug Reporting *debug-win32* | |
41 | |
42 If the Windows version of Vim crashes in a reproducible manner, | |
43 you can take some steps to provide a useful bug report. | |
44 | |
45 First, you must obtain the debugger symbols (PDB) file for your executable: | |
46 gvim.pdb for gvim.exe, or vim.pdb for vim.exe. It should be available | |
47 from the same place that you obtained the executable. Be sure to use | |
48 the PDB that matches the EXE. | |
49 | |
50 If you built the executable yourself with the Microsoft Visual C++ compiler, | |
51 then the PDB was built with the EXE. | |
52 | |
53 You can download the Microsoft Visual C++ Toolkit from | |
54 http://msdn.microsoft.com/visualc/vctoolkit2003/ | |
55 This contains the command-line tools, but not the Visual Studio IDE. | |
56 | |
57 The Debugging Tools for Windows can be downloaded from | |
58 http://www.microsoft.com/whdc/devtools/debugging/default.mspx | |
59 This includes the WinDbg debugger. | |
60 | |
61 If you have Visual Studio, use that instead of the VC Toolkit | |
62 and WinDbg. | |
63 | |
64 | |
65 (No idea what to do if your binary was built with the Borland or Cygwin | |
66 compilers. Sorry.) | |
67 | |
68 ========================================================================= | |
69 vim:tw=78:ts=8:ft=help:norl: |