[Mesa-dev] Debugging into Mesa Driver
idr at freedesktop.org
Wed Jun 4 13:09:40 PDT 2014
On 06/04/2014 11:14 AM, roshan chaudhari wrote:
> 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.
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
That should be sufficient. You can verify this by doing
gdb $(which glxgears)
Then, at the gdb prompt,
It will ask
Function "_mesa_Clear" not defined.
Make breakpoint pending on future shared library load? (y or [n])
Answer 'y'. Then,
If it stops in _mesa_Clear, you're good to go.
> Can anyone please help me with that?
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
More information about the mesa-dev