Enabling source level debugging of FFmpeg using gdb

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Enabling source level debugging of FFmpeg using gdb

Ajit Deshpande
Hello,
   I have ffmpeg v0.5 configured and built the source on linux.
I need to debug the same using gdb. so after configuring i changed the
config.mak entry
CC=gcc
 to
CC= gcc -g
and then build it.(make)
But still while debugging it shows many variables as  <variable optimized
out> and i am not able to debug correctly.
I have run configure as:
./configure --enable-memalign-hack

1.) How do i turn off any optimization happening, either compilation flags
or config option?
2.) What options should i use while configure, make to enable source level
debugging?


Thanks,
-AD.



Ted Turner <http://www.brainyquote.com/quotes/authors/t/ted_turner.html>  -
"Sports is like a war without the killing."
_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-user
Reply | Threaded
Open this post in threaded view
|

Re: Enabling source level debugging of FFmpeg using gdb

Etienne Buira
On Mon, Feb 08, 2010 at 05:04:18PM +0530, Ajit Deshpande wrote:

> Hello,
>    I have ffmpeg v0.5 configured and built the source on linux.
> I need to debug the same using gdb. so after configuring i changed the
> config.mak entry
> CC=gcc
>  to
> CC= gcc -g
> and then build it.(make)
> But still while debugging it shows many variables as  <variable optimized
> out> and i am not able to debug correctly.
> I have run configure as:
> ./configure --enable-memalign-hack
>
> 1.) How do i turn off any optimization happening, either compilation flags
> or config option?
> 2.) What options should i use while configure, make to enable source level
> debugging?

ffmpeg's ./configure --help | grep optimizations will tell some hint.
Reading last 10 lines or so can also answer some of your questions.
_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-user
Reply | Threaded
Open this post in threaded view
|

Re: Enabling source level debugging of FFmpeg using gdb

wl2776
Administrator
In reply to this post by Ajit Deshpande
I use the following line:

./configure --disable-optimizations --disable-static --enable-shared --disable-stripping --disable-mmx --disable-mmx2 --disable-ssse3 --enable-debug=3 --cpu=i686 --extra-cflags="-O0 -fno-inline" --enable-gpl --prefix=$HOME

This allowed using Valgrind and even detecting some memory leaks.

Probably, some switches are not related to optimizations