[Mesa-dev] Debugging into Mesa Driver
ppaalanen at gmail.com
Wed Jun 4 23:03:54 PDT 2014
On Wed, 4 Jun 2014 21:46:38 -0700
roshan chaudhari <rgc184 at gmail.com> wrote:
> Thanks for reply.
> I have added "CFLAGS='-Og -ggdb3' CXXFLAGS='-Og -ggdb3'" into configure
> file and ran
The advice was to add those to the configure command line, not into the
configure file. Undo all your edits from Mesa and start from scratch.
> "./configure --enable-debug" ; make; make install
> but still it did not step into driver.
So you tried exactly what Ian suggested, and the breakpoint did not
Also, are you perhaps trying to debug a 32-bit application on an
otherwise 64-bit system?
> On Wed, Jun 4, 2014 at 1:09 PM, Ian Romanick <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.
More information about the mesa-dev