I have been able to launch chrome browser able to run webgl demos through the
gldb gui by doing as follows:
a)Forced chrome to use single process with --single-process flag.
b)Chrome to use egl.
But I am unable to debug, I am wondering if I need to do anything to enable egl support in gldb. I have set break points which are never triggered.
If I ask chrome to use gl it crashes the whole application.
I tried the following :
/opt/google/chrome$gldb-gui ./chrome --single-process --use-gl=egl
On 15 January 2012 18:30, kalyan reddy <firstname.lastname@example.org> wrote:Hi
> Forgot to mention One point:
> WHen I close the gui , chrome gets launched. I get an error message in the
> console as follows:
> ERROR: ld.so: object 'libbugle.so' from LD_PRELOAD cannot be preloaded:
I suspect the problem is the /usr/bin/google-chrome is a shell script.
gldb doesn't currently handle that case very well, since it tries to
intercept GL commands in the shell instead of in the real process. In
such cases the easiest thing is usually to copy the shell script and
edit it to call gldb-gui where it would normally exec the real binary.
I think Chrome also uses multiple processes for sandboxing reasons,
which will probably also confuse gldb-gui. If it doesn't work,
something you can try is to
1. Edit src/platform/posix/platform/threads.h and #define
DEBUG_CONSTRUCTOR to 1 just above where it gets tested.
2. Use the TCP/IP protocol
on the local machine.
The first step is to ensure that Chrome only opens the TCP port on the
first GL call, and hence that only the process that is doing the GL
work will try to listen for the debugger, while using the TCP/IP
protocol means that gldb-gui can talk to whichever is the right
process, instead of trying to talk to the first process it launched.
It might not work, particularly if Chrome is using GL for its own
purposes, or if every process does some GL initialisation that
triggers the debugger filter.
I haven't tried to do any WebGL debugging, so if you figure out how to
make it work, please let me know and I'll add it to the FAQ.
Dr Bruce Merry
bmerry <@> gmail <.> com