annotate runtime/doc/debug.txt @ 632:b6632d553df3 v7.0182

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