[FFmpeg-devel] [PATCH] Source level debug

Diego Biurrun diego
Sun Mar 2 19:38:29 CET 2008


On Sun, Mar 02, 2008 at 05:15:21PM +0100, Benjamin Larsson wrote:
> Hi, adding -g3 provides more debug info for gdb and it makes graphical
> debuggers usable.
> 
> Together with --disable-optimizations you get a quite good view over
> what happens in the code.
> 
> --- configure	(revision 12275)
> +++ configure	(working copy)
> @@ -766,6 +767,7 @@
>      debug
>      extra_warnings
>      optimizations
> +    sldebug
>      shared
>      static
>  "

Ahem.

> @@ -1795,7 +1797,14 @@
>  
> -enabled debug && add_cflags -g
> +#check the debug level
> +if enabled debug; then
> +    if enabled sldebug; then
> +        add_cflags "-g3"
> +    else
> +        add_cflags "-g"
> +    fi
> +fi

enabled debug && (enabled sldebug && add_cflags "-g3" || add_cflags "-g")

Are -g and -g3 mutually incompatible?  Otherwise just add both, i.e.

enabled debug   && add_cflags -g
enabled sldebug && add_cflags -g3

Diego




More information about the ffmpeg-devel mailing list