[vlc-devel] Building a debug version of VLC
mark.bidewell at alumni.clemson.edu
Mon Jan 26 23:50:29 CET 2009
On Mon, Jan 26, 2009 at 5:31 PM, Ed Sutton <ESutton at fescorp.com> wrote:
> Hi Mark,
>> Thanks, I am working some more the gdb/ddd and I see that if I attach
>> to the process after I have performed some operations that the modules
>> begin to fill in, Is this the way to use the debugger with VLC?
> How, do you attach to a running process with gdb?
> I have been trying to debug into some VLC ffmpeg modules in order to learn how to implement a frame-based decoder. I am a Linux newbie and I find gdb a challenge. I tried some gui front-ends; DDD and Insight, but neither seemed to work or were intuitive.
> I think a number of the modules I want to investigate are not loaded until run time. I have been setting progressive break point with some success. Gdb usually tells me it does not know about the source file but asks me if I want it to break in a future shared load and when I answer "yes" it sometimes seems to find it for some source files.
> I am trying to set breakpoints in \ffmpeg\lbavcodec\mjpegdec.c but can't seem to find the trick so that gdb understands the symbolic information. When I configured ffmpeg, I added an enable-debug line. Then before I did a make, I set the CFLAGS environment variable = "-g". Maybe I need to re-check my steps and rebuild to get proper symbolic information?
> Thanks in advance for any tips,
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
the syntax would be gdb [path-to-vlc] [pid-of-running-instance]
This will pause vlc allowing you to set breakpoints and you can then continue.
I haven't tried this extensively as yet, however, it seems to do the
trick. What is problematic is that you must perform the operation
first in order to load all the modules before you can debug anything.
If you had a bug such as a memory fault that was preventing the code
path from completing, I don't think this would work. Maybe some could
suggest a better way or are symbolic debuggers not recommended for
More information about the vlc-devel