[FFmpeg-devel] [PATCH] Source level debug
Rich Felker
dalias
Sun Mar 2 21:54:39 CET 2008
On Sun, Mar 02, 2008 at 08:30:34PM +0000, M?ns Rullg?rd wrote:
> 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.
Probably because most users do not want 500 megs of extra crap in
their build directory (and the corresponding slowdown of compile due
to disk io) for a feature they won't use.
Rich
More information about the ffmpeg-devel
mailing list