Debugging session and effective bug reporting session notes.

Software debugging &amp; effective bug reprting

Bug reporting,

How to report an annoying feature and/or requesting a new feature in an application.

BE NICE!

Talking to the developer and/or explaining why this feature is annoying or why this missing feature is important is a big plus "When I explained why the libwxgtk should be compiled with unicode/gtk2 support is important for Arabic language, The package maintainer got interested".

Debugging

What is debugging, What's a debugger ?

The GNU debugger "gdb"

Compiling applications with debugging symbols.

-ggdb

Removing the debugging symbols

"strip -S"

Obtaining a meaningful back trace.

What's a back trace ?

A list of steps by the application or a list of function calls lead to this situation.

What is a core file ? What's a core dump ?

Simply the memory of the application is being dumped to a file!

Getting a useful back trace:

we must compile with debugging symbols

-ggdb

from a core file

gdb &lt;application&gt; &lt;core file&gt;
where

Attaching to another process

gdb &lt;application&gt; &lt;pid&gt;
where

This is useful if the application is started via a script as openoffice and mozilla.

Directly from gdb

gdb foo
set args bar zot
r
"When the crash happens: go back to the terminal, You might need to press C-C"
where
quit