-
Notifications
You must be signed in to change notification settings - Fork 2
Debugging Cream Browser
If you get a crash in Cream-Browser. It may be very helpful for us to have a lot of informations.
This document will help you to produce a verbose output which will help you to fix an eventual bug.
To debug Cream-Browser, you need debug-symbols, so configure the project in debug mode then build it :
$ ./configure --enable-debug
$ make clean all
This will build Cream-Browser with more strict CFLAGS and with debug-symbols.
gdb is one of my favorite tool, very helpful to debug every program. We're gonna to use it in the next of the HowTo.
NB: From here, I will suppose that you didn't installed Cream-Browser and you're doing every commands from an archive or the cloned git repository.
Because Cream-Browser isn't installed, lua library isn't too. So you need to modify the environment variable LUA_PATH
to tell Cream-Browser to look in the specified directory.
In the same way, you have to modify your environment variable LD_LIBRARY_PATH
to tell Cream-Browser where to search modules, and specify the path to your configuration file.
The final command is :
$ LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:src/modules/mod-dummy" \
LUA_PATH="${LUA_PATH};src/lua/?.lua;src/lua/?/init.lua" \
gdb -q src/cream-browser
(gdb) run -c path/to/your/rc.lua
Now reproduce the bug. When Cream-Browser crashes, gdb will give you back the control (via the gdb's shell).
(gdb) bt
<the backtrace>
Here only the backtrace is important. Paste it somewhere (on the mailing list, or on the bug tracker ), we will do the best to fix it :)