How to Debug VLC with GDB(need basic steps)

*nix specific usage questions
pjain01
New Cone
New Cone
Posts: 8
Joined: 20 Mar 2009 07:55

How to Debug VLC with GDB(need basic steps)

Postby pjain01 » 06 Apr 2009 16:22

I am trying to compile VLC for doing a small enhancement in it, Can anyone help me how can I use GDB along with VLC.I had tried following steps for compiling the VLC for debug purpose
./configure --enable-debug
make
make install
gdb ./vlc

but while I try to put breakpoint on a file it gives me an error that
"No symbol table is loaded. Use the "file" command.".
Also can any one suggest me which development environemt is best for debugging the VLC(any GUI tool like QT4, Eclipse or anything else) in linux

Any hint or any clue will be highly appreciated.

Best Regards,
Parveen Jain

Rémi Denis-Courmont
Developer
Developer
Posts: 15265
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: How to Debug VLC with GDB(need basic steps)

Postby Rémi Denis-Courmont » 06 Apr 2009 19:38

You simply need to make sure you've spelt the breakpoint right.

Note however that gdb cannot trace vlc 0.9 as it is a script, and that gdb will deadlock vlc 1.0 due to gdb signal handling bugs.

Code: Select all

% gdb ./vlc GNU gdb 6.8-debian Copyright (C) 2008 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "i486-linux-gnu"... (gdb) break var_GetChecked Function "var_GetChecked" not defined. Make breakpoint pending on future shared library load? (y or [n]) y Breakpoint 1 (var_GetChecked) pending. (gdb) run Starting program: /home/remi/videolan/vlc/build/vlc [Thread debugging using libthread_db enabled] VLC media player 1.0.0-pre1 Goldeneye [New Thread 0xb7c716c0 (LWP 2291)] [Switching to Thread 0xb7c716c0 (LWP 2291)] Breakpoint 1, var_GetChecked (p_this=0x8f06950, psz_name=0xb7eecc2f "memcpy", expected_type=64, p_val=0xbff3f890) at ../../src/misc/variables.c:798 798 if( i_var >= 0 )
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded


Return to “VLC media player for Linux and friends Troubleshooting”

Who is online

Users browsing this forum: Google [Bot] and 5 guests