comparison runtime/doc/debug.txt @ 2581:e8a482a7fa6c

Updated runtime files.
author Bram Moolenaar <bram@vim.org>
date Sun, 19 Sep 2010 19:01:21 +0200
parents 073ff46fe397
children 85c5a72551e2
comparison
equal deleted inserted replaced
2580:06aa43dde561 2581:e8a482a7fa6c
1 *debug.txt* For Vim version 7.3. Last change: 2010 Jul 20 1 *debug.txt* For Vim version 7.3. Last change: 2010 Sep 14
2 2
3 3
4 VIM REFERENCE MANUAL by Bram Moolenaar 4 VIM REFERENCE MANUAL by Bram Moolenaar
5 5
6 6
20 When Vim crashes in one of the test files, and you are using gcc for 20 When Vim crashes in one of the test files, and you are using gcc for
21 compilation, here is what you can do to find out exactly where Vim crashes. 21 compilation, here is what you can do to find out exactly where Vim crashes.
22 This also applies when using the MingW tools. 22 This also applies when using the MingW tools.
23 23
24 1. Compile Vim with the "-g" option (there is a line in the Makefile for this, 24 1. Compile Vim with the "-g" option (there is a line in the Makefile for this,
25 which you can uncomment). 25 which you can uncomment). Also make sure "strip" is disabled (do not
26 install it, or use the line "STRIP = /bin/true").
26 27
27 2. Execute these commands (replace "11" with the test that fails): > 28 2. Execute these commands (replace "11" with the test that fails): >
28 cd testdir 29 cd testdir
29 gdb ../vim 30 gdb ../vim
30 run -u unix.vim -U NONE -s dotest.in test11.in 31 run -u unix.vim -U NONE -s dotest.in test11.in
65 66
66 If the Windows version of Vim crashes in a reproducible manner, you can take 67 If the Windows version of Vim crashes in a reproducible manner, you can take
67 some steps to provide a useful bug report. 68 some steps to provide a useful bug report.
68 69
69 70
70 GENERIC ~ 71 3.1 GENERIC ~
71 72
72 You must obtain the debugger symbols (PDB) file for your executable: gvim.pdb 73 You must obtain the debugger symbols (PDB) file for your executable: gvim.pdb
73 for gvim.exe, or vim.pdb for vim.exe. The PDB should be available from the 74 for gvim.exe, or vim.pdb for vim.exe. The PDB should be available from the
74 same place that you obtained the executable. Be sure to use the PDB that 75 same place that you obtained the executable. Be sure to use the PDB that
75 matches the EXE (same date). 76 matches the EXE (same date).
87 a Vim executable compiled with the Borland compiler; gdb (see above 88 a Vim executable compiled with the Borland compiler; gdb (see above
88 |debug-gcc|) for the Cygwin and MinGW compilers. 89 |debug-gcc|) for the Cygwin and MinGW compilers.
89 90
90 91
91 *debug-vs2005* 92 *debug-vs2005*
92 2.2 Debugging Vim crashes with Visual Studio 2005/Visual C++ 2005 Express ~ 93 3.2 Debugging Vim crashes with Visual Studio 2005/Visual C++ 2005 Express ~
93 94
94 First launch vim.exe or gvim.exe and then launch Visual Studio. (If you don't 95 First launch vim.exe or gvim.exe and then launch Visual Studio. (If you don't
95 have Visual Studio, follow the instructions at |get-ms-debuggers| to obtain a 96 have Visual Studio, follow the instructions at |get-ms-debuggers| to obtain a
96 free copy of Visual C++ 2005 Express Edition.) 97 free copy of Visual C++ 2005 Express Edition.)
97 98
121 Visual C++ 2005 Express Edition cannot save minidumps and it cannot be 122 Visual C++ 2005 Express Edition cannot save minidumps and it cannot be
122 installed as a just-in-time debugger. Use WinDbg, |debug-windbg|, if you 123 installed as a just-in-time debugger. Use WinDbg, |debug-windbg|, if you
123 need to save minidumps or you want a just-in-time (postmortem) debugger. 124 need to save minidumps or you want a just-in-time (postmortem) debugger.
124 125
125 *debug-windbg* 126 *debug-windbg*
126 2.3 Debugging Vim crashes with WinDbg ~ 127 3.3 Debugging Vim crashes with WinDbg ~
127 128
128 See |get-ms-debuggers| to obtain a copy of WinDbg. 129 See |get-ms-debuggers| to obtain a copy of WinDbg.
129 130
130 As with the Visual Studio IDE, you can attach WinDbg to a running Vim process. 131 As with the Visual Studio IDE, you can attach WinDbg to a running Vim process.
131 You can also have your system automatically invoke WinDbg as a postmortem 132 You can also have your system automatically invoke WinDbg as a postmortem
147 148
148 To save a minidump, type the following at the WinDbg command line: > 149 To save a minidump, type the following at the WinDbg command line: >
149 .dump vim.dmp 150 .dump vim.dmp
150 < 151 <
151 *debug-minidump* 152 *debug-minidump*
152 2.4 Opening a Minidump ~ 153 3.4 Opening a Minidump ~
153 154
154 If you have a minidump file, you can open it in Visual Studio or in WinDbg. 155 If you have a minidump file, you can open it in Visual Studio or in WinDbg.
155 156
156 In Visual Studio 2005: on the File menu, choose Open, then Project/Solution. 157 In Visual Studio 2005: on the File menu, choose Open, then Project/Solution.
157 Navigate to the .dmp file and open it. Now press F5 to invoke the debugger. 158 Navigate to the .dmp file and open it. Now press F5 to invoke the debugger.
159 160
160 In WinDbg: choose Open Crash Dump on the File menu. Follow the instructions in 161 In WinDbg: choose Open Crash Dump on the File menu. Follow the instructions in
161 |debug-windbg| to set the Symbol File Path. 162 |debug-windbg| to set the Symbol File Path.
162 163
163 *get-ms-debuggers* 164 *get-ms-debuggers*
164 2.5 Obtaining Microsoft Debugging Tools ~ 165 3.5 Obtaining Microsoft Debugging Tools ~
165 166
166 The Debugging Tools for Windows (including WinDbg) can be downloaded from 167 The Debugging Tools for Windows (including WinDbg) can be downloaded from
167 http://www.microsoft.com/whdc/devtools/debugging/default.mspx 168 http://www.microsoft.com/whdc/devtools/debugging/default.mspx
168 This includes the WinDbg debugger. 169 This includes the WinDbg debugger.
169 170