Tutorial for gdb debug under Win32
Editing Tutorial for gdb debug under Win32
Point of this page is to show how to get VLC related crash info with tool called gdb. This crash info is VERY useful when tracking down the reason for the crash, so if you can provide us this info, the likehood for bug fix is much higher.
What you need
- Computer that runs Windows builds of VLC (this tutorial isn't for 64 bit VLC builds, but it will work for 64 bit Windows versions that run 32 bit VLC).
- Way to crash your VLC (freezes aren't useful unfortunately)
What you have to do
1. Download latest nightly debug build of VLC from http://nightlies.videolan.org/build/win32/?C=M;O=D
- Trunk folders are current development (unstable) version, Branch folders are current/next stable versions (usually you want latest branch folder)
- Make sure you take the debug version. It is usually named as vlc-x.y.z-something-date-randomnumber-win32-debug.7z or vlc-x.y.z-something-date-randomnumber-win32-debug.zip
2. Extract the .zip/.7z to somewhere (like in your desktop)
- Tool called 7-Zip can be used to extract .7z packages
- Folder doesn't really matter. So you don't have to uninstall your current VLC version.
3. Run vlc.exe from that folder and see if you can replicate the issue that is causing your current VLC to crash.
- Some issues might be already fixed
4. If you can replicate the issue, next step is to download gdb debugger from http://sourceforge.net/projects/mingw/files/OldFiles/gdb-6.8-mingw.tar.bz2/download
5. Extract the gdb.exe from that package to the same directory where you extracted the VLC debug build
- Tool called 7-Zip can be used to extract .tar.bz2 packages (actually that is compressed twice, once with bz2 and once with tar)
6. Launch gdb.exe by double clicking it
- You can also launch it via .bat or by other method
7. Type in target exec vlc and press enter
- gdb takes commands via this terminal
8. Type in run and VLC should start
- first vlc.exe startup might take some time
9. After vlc.exe is launched, repeat the actions that crash VLC
- certain crashes might not happen when vlc.exe is run via gdb.exe, so crash might not happen
10. Once vlc.exe has crashed, type in bt
- crashes can be noticed from gdb console, which shows "Program received signal..." message
- bt is short for backtrace
11. Share us the info that bt command gave
- right click the gdb window and select Edit -> Mark to mark the text you want to copy, and then left click to select area, then right click to copy it to clipboard