[Mesa-dev] Debugging into Mesa Driver

Roshan Chaudhari rgc184 at gmail.com
Wed Jun 11 10:45:22 PDT 2014


Thanks a lot for your help.!

CFLAGS='-O0 -ggdb3' CXXFLAGS='-O0 -ggdb3' ./autogen.sh --prefix=/usr
--libdir=/usr/lib/i386-linux-gnu --with-gallium-drivers=svga
--with-dri-drivers= --enable-xa --disable-dri3; make;

did the trick.


On Thu, Jun 5, 2014 at 9:01 AM, Ian Romanick <idr at freedesktop.org> wrote:

> On 06/04/2014 09:46 PM, roshan chaudhari wrote:
> > Thanks for reply.
> >
> > I have added "CFLAGS='-Og -ggdb3' CXXFLAGS='-Og -ggdb3'" into configure
> > file and ran
> > "./configure --enable-debug" ; make; make install
> >
> > but still it did not step into driver.
>
> Are you sure it's using the driver you built instead of the system
> installed driver?
>
>     LIBGL_DEBUG=verbose glxgears
>
> will give some information about the driver being used (see below).  If
> that doesn't match the driver installed, you'll need to use
> LD_LIBRARY_PATH and possibly LIBGL_DRIVERS_PATH to get the right one.
>
> libGL: OpenDriver: trying /usr/lib64/dri/tls/i965_dri.so
> libGL: OpenDriver: trying /usr/lib64/dri/i965_dri.so
> libGL: Can't open configuration file /home/idr/.drirc: No such file or
> directory.
> libGL: Can't open configuration file /home/idr/.drirc: No such file or
> directory.
>
> > On Wed, Jun 4, 2014 at 1:09 PM, Ian Romanick <idr at freedesktop.org
> > <mailto:idr at freedesktop.org>> wrote:
> >
> >     On 06/04/2014 11:14 AM, roshan chaudhari wrote:
> >     > Hello,
> >     >         I just cloned the mesa driver from git repository. I am
> trying
> >     > to debug the opengl application with mesa driver. I am not sure
> which
> >     > flag to enable for debugging and where, I built a driver with
> >     > -enable-debug in Makefile and added --DEBUG in CFLAGS in Makefile
> but
> >     > still when I try to step into driver code it does not allow me. I
> am
> >     > doing it with gdb in ubuntu.
> >
> >     Modifying the CFLAGS in the Makefile is likely to cause problems.
> >     Instead, try
> >
> >     CFLAGS='-Og -ggdb3' CXXFLAGS='-Og -ggdb3' ./configure --enable-debug
> >     <your other configure options>
> >
> >     If your version of GCC is too old, you will need to use -O0 instead
> >     of -Og.
> >
> >     That should be sufficient.  You can verify this by doing
> >
> >         gdb $(which glxgears)
> >
> >     Then, at the gdb prompt,
> >
> >         break _mesa_Clear
> >
> >     It will ask
> >
> >         Function "_mesa_Clear" not defined.
> >         Make breakpoint pending on future shared library load? (y or [n])
> >
> >     Answer 'y'.  Then,
> >
> >         run
> >
> >     If it stops in _mesa_Clear, you're good to go.
> >
> >     > Can anyone please help me with that?
> >     >
> >     > --
> >     >
> >     > Thanks,
> >     > Roshan
> >     >
> >     > _______________________________________________
> >     > mesa-dev mailing list
> >     > mesa-dev at lists.freedesktop.org <mailto:
> mesa-dev at lists.freedesktop.org>
> >     > http://lists.freedesktop.org/mailman/listinfo/mesa-dev
> >
> >
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20140611/6e05a2fb/attachment.html>


More information about the mesa-dev mailing list