[FFmpeg-devel] [PATCH] Source level debug
Måns Rullgård
mans
Sun Mar 2 21:30:34 CET 2008
Benjamin Larsson <banan at ludd.ltu.se> writes:
> 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.
>
> MvH
> Benjamin Larsson
> Index: configure
> ===================================================================
> --- configure (revision 12275)
> +++ configure (working copy)
> @@ -175,6 +175,7 @@
> echo " --disable-optimizations disable compiler optimizations"
> echo " --enable-extra-warnings enable more compiler warnings"
> echo " --disable-strip disable stripping of executables and shared libraries"
> + echo " --enable-sldebug enable source level debug"
> echo ""
> echo "NOTE: Object files are built at the place where configure is launched."
> exit 1
> @@ -766,6 +767,7 @@
> debug
> extra_warnings
> optimizations
> + sldebug
> shared
> static
> "
> @@ -1795,7 +1797,14 @@
> check_func XOpenDisplay -lX11 &&
> check_func XShmCreateImage -lX11 -lXext
>
> -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
Why not simply always use -g3 if that is supported? I see no need for
extra command line options.
--
M?ns Rullg?rd
mans at mansr.com
More information about the ffmpeg-devel
mailing list