About debugging:
General information:
Debugging is a skill which you can learn. There are quite a few good
documents that describe how to make a good bug-reports. Please read them
before you get into action, your bug won't run away and it won't kill
you. Rather we want to kill the bug and we want your help :-) So lets go
to battle well prepared. Here we have the
Bugzilla Bug Reporting HOWTO
and Simon Tatham from Putty also wrote a very good document:
How to Report Bugs Effectively
Specific fluxbox things:
Output from fluxbox:
Like any other app fluxbox sends all messages to the console it was
started from. The problem is that under normal circumstances alll output
goes to the (alt-ctrl-f1) console. Change in your .xinitrc
the exec fluxboxline to exec xterm or whatever
your favourite term may be. Start X and start fluxbox in that xterm, and
lo and behold, all messages from fluxbox.
The info we want:
We want to know a lot of things. Make sure you know all about them.
- Your operating system / distribution and it's version.
- Fluxbox version, if CVS (or devel. tarball) then which day?
- When did it happen? Did you do something? Can you reproduce it?
- Your settings. They can be found in
~/.fluxbox/init
What to do with core-dumps.
So if you ever get a core dumping fluxbox in the fluxbox you just
built from cvs do the following: Go to irc.openprojects.net#fluxbox and
tell fluxgen you got a coredump. Give him all info he asks for and he
will also ask you to do the following. It's quite a lot of work but
anybody with a bit of common sense and some unix experience can do it.
Try to read this manual in a comprehending way. So don't bug me with
details.
Rebuild fluxbox:
Yes you read it right. To become a real debugger you have to rebuild
fluxbox with debugging symbols.
Build fluxbox as usual and add the following option when you do the make:
CFLAGS=-Wall -g3 CXXFLAGS=-Wall -g3 make
If you use the srpms from the fluxbox-site you can do something like this:
$ su
# rpm -ivh fluxbox-0.1.11.1mdk.src.rpm
# cd /usr/src/RPM/SPECS
# env DEBUG=true rpm -ba fluxbox.spec
# rpm -Uvh --force /usr/src/RPM/RPMS/i686/fluxbox*
# exit
$ mkdir -p ~/src/fluxbox
$ cp -R /usr/src/RPM/BUILD/fluxbox* ~/src/fluxbox
Go to the fluxbox directory (So we get the coredump in the right place):
cd ~/src/fluxbox/src
The shell has a nifty feature that disables core-files so make sure
you really get a core file with:
ulimit -c unlimited
Start X:
startx
Let's debug:
Do whatever it takes to make Fluxbox dump core. And now we start debugging:
gdb fluxbox core
And issue this command in gdb:
where
Now you get a lot of output. Fluxgen wants to know all the output
that starts with a: "#"
Now paste that into an e-mail to
fluxgen and also
attach the four settings files in ~/.fluxbox.
Please do not remove the core and the sourcecode directory yet.
Fluxgen may want to ask you a few extra question and then you will need
them.
About:
If you find things to improve in this document please send
me an e-mail.
|