On 18.12.2008 5:20, Michael Conrad wrote:
> On Wed, 17 Dec 2008 19:44:32 -0500, AliReza Khoshgoftar
> <[email protected]> wrote:
>
>> Hi There,
>>
>> I had another question which maybe rather categorized as a programming
>> question, but anyway it may be good to ask it here. Since it is about
>> FFMPEG somehow.
>>
>
> Well, to be specific, it is a gcc/gdb question. In order for gdb to trace
> a function, it needs to have debugging symbols. And, there is a command
> line switch "-g" in gcc which generates the debugging symbols, and there
> is a program ("strip") that is commonly used to remove all these symbols
> from a library before installing it.
>
> But this question is relevant to the list because the answer is that you
> need a "debugging build" of libav. You need to tell libav's makefile to
> add "-g" to all calls to gcc, and tell the makefile not to run "strip" on
> the library when you are done. Also, its handy not to get lost in
> assembly code and you want your debugger to generally follow the source
> line-by-line, so might as well disable optimizations while you're at it.
>
> And, you do this with the configure command, which generates the makefiles
> for you.
>
> So your answer:
> configure --enable-shared --disable-static --disable-optimizations
> --disable-mmx --disable-stripping
>
> You can look at ./configure --help for details.
>
> Also, I had a post back on Nov 26 where I explained how to build a debug
> version of libav and install it to a separate directory than the one that
> is part of your system. Check the archives if that sounds like what you
> need.
>
>
Relevant note:
To debug FFmpeg in Windows you have to build FFmpeg with -gstabs instead
of just -g (because windows versions of gdb aren't working well with
default debug symbol format and you have to use stabs). From my
experience, using the latest gcc 4.3 for windows (alpha-release
available from MinGW files section at sourceforge) with gdb 6.8-3
(available there too) is the best option (older versions of gdb may
crash, and without gcc 4.3 some gdb 6.8 functions are not working
properly - "next" for example).
_______________________________________________
libav-user mailing list
[email protected]
https://lists.mplayerhq.hu/mailman/listinfo/libav-user