Maurice van der Pot wrote:

I have just started looking into DRI development and I have been experiencing
some difficulties using gdb. For example, I cannot currently step into functions of libGL (it was compiled with debug info and LD_LIBRARY_PATH is set correctly). Another thing is that the symbols from r200_dri.so are only
loaded after I have typed sharedlibrary r200_dri, they're not loaded automatically when the shared object is loaded even though gdb's option (I forget its name) to autoload symbols is on.

How are you building? Are you building everything in the DRI tree? libGL in the DRI tree and the drivers in the Mesa tree? The libGL built in the Mesa tree is *NOT* the one used with the DRI drivers. The libGL built in the DRI tree (or from the DRI binary snapshots) should have all the debug symbols included.


As for r200_dri.so, are you sure it's getting the right one? If you run with 'LIBGL_DEBUG=verbose' it will print out which driver binary is being used.

Realistically, you *need* two systems for driver debugging. I've found that using a skunky old laptop to ssh in and run gdb is the best setup. In a pinch, an old 286 with a terminal program as a serial terminal will also work.

As I was struggling to put together a convenient setup for debugging it got
me wondering how those of you who use gdb for debugging have things set up.
I'm interested to know things like locations of compiled libs/executables
wrt the system libs, environment variables, makefile/config modifications, etc.

For a developer, the best bet is to get the DRI tree and the Mesa tree. Build the DRI tree and do a 'make install' as root *once*. Then do your development in the Mesa tree, build your drivers in the Mesa tree, and run with 'LIBGL_DRIVERS_DIR' set to the lib directory in the Mesa tree (i.e., from the top of the Mesa tree do 'export LIBGL_DRIVERS_DIR=$(pwd)/lib'.


Maybe I can gather this information into a document on the Wiki later on.

Not a bad idea.




-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click
--
_______________________________________________
Dri-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/dri-devel

Reply via email to